Skip to content

Commit

Permalink
Fix possible segfault when exiting a screen when using the Qt painter
Browse files Browse the repository at this point in the history
This changes MythScreenStack::PopScreen() to call deleteLater() on the
screen rather than immediately deleting it so as to allow any keypressEvent
handlers to complete safely before the screen is deleted when control
returns to the event loop.

Fixes #11383.
  • Loading branch information
paul-h authored and Paul Harrison committed Mar 24, 2013
1 parent 9ec05b1 commit c713988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythscreenstack.cpp
Expand Up @@ -128,7 +128,7 @@ void MythScreenStack::PopScreen(MythScreenType *screen, bool allowFade,
m_Children.remove(i);
}
if (deleteScreen)
delete screen;
screen->deleteLater();

screen = NULL;

Expand Down

0 comments on commit c713988

Please sign in to comment.