Skip to content

Commit

Permalink
Fix crash when called from non-GUI application (like mythutil)
Browse files Browse the repository at this point in the history
mythcorecontext destructor calls GetNotificationCenter() ; which would have created the MainWindow
  • Loading branch information
jyavenard committed Jul 9, 2013
1 parent 4100890 commit 86bd971
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -377,10 +377,10 @@ MythPainter *GetMythPainter(void)

MythUINotificationCenter *GetNotificationCenter(void)
{
if (!MythMainWindow::getMainWindow() ||
!MythMainWindow::getMainWindow()->GetCurrentNotificationCenter())
if (!mainWin ||
!mainWin->GetCurrentNotificationCenter())
return NULL;
return MythMainWindow::getMainWindow()->GetCurrentNotificationCenter();
return mainWin->GetCurrentNotificationCenter();
}

#ifdef USE_OPENGL_PAINTER
Expand Down

0 comments on commit 86bd971

Please sign in to comment.