Fix using a deleted theme when running another test

The pointer to and old theme was being used in update_mouse_cursor().
This commit is contained in:
David Capello 2024-12-07 13:01:12 -03:00
parent d5d5894df6
commit 6830e0ce94

View File

@ -871,12 +871,11 @@ void set_theme(Theme* theme, const int uiscale)
{
old_ui_scale = current_ui_scale;
current_ui_scale = uiscale;
current_theme = theme;
if (theme) {
theme->regenerateTheme();
current_theme = theme;
// Set the theme for all widgets
details::reinitThemeForAllWidgets();