mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:18:38 +02:00
Fix crash when using null DisplayPlugin in GraphicsEngine during shutdown
This commit is contained in:
parent
0cfc090655
commit
a400cea040
1 changed files with 8 additions and 0 deletions
|
@ -132,6 +132,10 @@ static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SI
|
||||||
|
|
||||||
bool GraphicsEngine::shouldPaint() const {
|
bool GraphicsEngine::shouldPaint() const {
|
||||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||||
|
if (!displayPlugin) {
|
||||||
|
// We're shutting down
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_PAINT_DELAY
|
#ifdef DEBUG_PAINT_DELAY
|
||||||
static uint64_t paintDelaySamples{ 0 };
|
static uint64_t paintDelaySamples{ 0 };
|
||||||
|
@ -175,6 +179,10 @@ void GraphicsEngine::render_performFrame() {
|
||||||
{
|
{
|
||||||
PROFILE_RANGE(render, "/getActiveDisplayPlugin");
|
PROFILE_RANGE(render, "/getActiveDisplayPlugin");
|
||||||
displayPlugin = qApp->getActiveDisplayPlugin();
|
displayPlugin = qApp->getActiveDisplayPlugin();
|
||||||
|
if (!displayPlugin) {
|
||||||
|
// We're shutting down
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue