mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Don't segfault on errors during construction of ConsolePanel
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1645 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -295,6 +295,8 @@ ConsolePanel::ConsolePanel(Window* parent, int id)
|
||||
, is_active_window(false)
|
||||
, blinker_state(0)
|
||||
, blinker_timer(this)
|
||||
, messages(nullptr)
|
||||
, entry(nullptr)
|
||||
{
|
||||
// init controls
|
||||
splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
@@ -363,6 +365,8 @@ void ConsolePanel::onIdle(wxIdleEvent&) {
|
||||
}
|
||||
|
||||
void ConsolePanel::get_pending_errors() {
|
||||
// The panel might not be initialized yet, in particular, construction of controls might fail, which results in a popup dialog with an event loop
|
||||
if (!messages) return;
|
||||
// add pending messages
|
||||
MessageType type;
|
||||
String msg;
|
||||
|
||||
Reference in New Issue
Block a user