fix(ui): Prevent PopStyleColor crash by using frame-scoped tint flag
This commit is contained in:
@@ -256,9 +256,11 @@ class App:
|
||||
imgui.end_menu()
|
||||
|
||||
def _gui_func(self) -> None:
|
||||
pushed_prior_tint = False
|
||||
if self.perf_profiling_enabled: self.perf_monitor.start_component("_gui_func")
|
||||
if self.is_viewing_prior_session:
|
||||
imgui.push_style_color(imgui.Col_.window_bg, vec4(50, 40, 20))
|
||||
pushed_prior_tint = True
|
||||
try:
|
||||
self.perf_monitor.start_frame()
|
||||
self._autofocus_response_tab = self.controller._autofocus_response_tab
|
||||
@@ -761,7 +763,7 @@ class App:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
if self.is_viewing_prior_session:
|
||||
if pushed_prior_tint:
|
||||
imgui.pop_style_color()
|
||||
|
||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_gui_func")
|
||||
|
||||
Reference in New Issue
Block a user