fix(color): full screen dialog may crash (#6806)

This commit is contained in:
philmoz
2025-11-20 06:26:40 +10:00
committed by GitHub
parent 325a56d8c2
commit 000668bf0b
2 changed files with 4 additions and 11 deletions
@@ -49,11 +49,6 @@ FullScreenDialog::FullScreenDialog(
bringToTop(); bringToTop();
delayLoad();
}
void FullScreenDialog::delayedInit()
{
build(); build();
} }
@@ -165,9 +160,9 @@ void FullScreenDialog::deleteLater(bool detach, bool trash)
} }
} }
void FullScreenDialog::setMessage(std::string text) void FullScreenDialog::setMessage(const char* text)
{ {
messageLabel->setText(text); if (messageLabel) messageLabel->setText(text);
} }
static void run_ui_manually() static void run_ui_manually()
@@ -39,7 +39,7 @@ class FullScreenDialog : public Window
} }
#endif #endif
void setMessage(std::string text); void setMessage(const char* text);
void onEvent(event_t event) override; void onEvent(event_t event) override;
void onCancel() override; void onCancel() override;
@@ -83,9 +83,7 @@ class FullScreenDialog : public Window
bool running = false; bool running = false;
std::function<bool(void)> closeCondition; std::function<bool(void)> closeCondition;
std::function<void(void)> confirmHandler; std::function<void(void)> confirmHandler;
StaticText* messageLabel; StaticText* messageLabel = nullptr;
void build(); void build();
void delayedInit() override;
}; };