Merge pull request #15722 from sabrina-shanman/crash_no-display-plugin

(BUGZ-563) Fix crash using null DisplayPlugin in GraphicsEngine
This commit is contained in:
Sabrina Shanman 2019-06-10 14:54:11 -07:00 committed by GitHub
commit 2b90d841b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,6 +132,10 @@ static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SI
bool GraphicsEngine::shouldPaint() const {
auto displayPlugin = qApp->getActiveDisplayPlugin();
if (!displayPlugin) {
// We're shutting down
return false;
}
#ifdef DEBUG_PAINT_DELAY
static uint64_t paintDelaySamples{ 0 };
@ -175,6 +179,10 @@ void GraphicsEngine::render_performFrame() {
{
PROFILE_RANGE(render, "/getActiveDisplayPlugin");
displayPlugin = qApp->getActiveDisplayPlugin();
if (!displayPlugin) {
// We're shutting down
return;
}
}
{