diff --git a/ui/hud_overlay_clean.py b/ui/hud_overlay_clean.py index e2fa11e..99e0161 100644 --- a/ui/hud_overlay_clean.py +++ b/ui/hud_overlay_clean.py @@ -789,7 +789,10 @@ class HUDOverlay(QWidget): profit = self._stats.profit_loss color = "#7FFF7F" if profit >= 0 else "#FF7F7F" self.profit_label.setText(f"{profit:+.2f} PED") - self.profit_label.setStyleSheet(f"font-size: 18px; font-weight: bold; color: {color};") + try: + self.profit_label.setStyleSheet(f"font-size: 18px; font-weight: bold; color: {color};") + except Exception: + pass # Stylesheet error, ignore except RuntimeError: pass @@ -804,7 +807,10 @@ class HUDOverlay(QWidget): else: color = "#FF7F7F" self.return_label.setText(f"{ret:.1f}%") - self.return_label.setStyleSheet(f"font-size: 16px; font-weight: bold; color: {color};") + try: + self.return_label.setStyleSheet(f"font-size: 16px; font-weight: bold; color: {color};") + except Exception: + pass # Stylesheet error, ignore except RuntimeError: pass