History

temporary fix to crash on startup

Brad Hefta-Gaub committed 10 years ago

Commit 5ec5ff91 parent 511ad761 file · +5 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+5−2
@@ -615,8 +615,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 614 unmodified lines
615615 OffscreenUi::warning(nullptr, "Error Loading Script", filename + " failed to load.");
616616 }, Qt::QueuedConnection);
617617
618− _runningScriptsWidget = new RunningScriptsWidget(_window);
619−
620618
621619 #ifdef _WIN32
622620 WSADATA WsaData;
@@ -981,6 +979,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 358 unmodified lines
981979
982980 connect(this, &Application::applicationStateChanged, this, &Application::activeChanged);
983981
982+ // FIXME -- NOTE: This will call ProcessEvents() which can cause authentication signals to fire, which
983+ // if not logged in can cause the login dialog to appear. As currently implemented, the login requires
984+ // the offscreen UI to render, so this needs to be well after OffscreenUi is available
985+ _runningScriptsWidget = new RunningScriptsWidget(_window);
986+
984987 qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0);
985988 }
986989