Permalink
Browse files

Fix destroyMainWindow when gCoreContext is not created yet

Fixes #10718
  • Loading branch information...
1 parent 7f18de0 commit 922a9caa85a82d09958466fe7c1ac8509e33a421 @Beirdo Beirdo committed May 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 mythtv/libs/libmythui/mythmainwindow.cpp
View
3 mythtv/libs/libmythui/mythmainwindow.cpp
@@ -342,7 +342,8 @@ MythMainWindow *MythMainWindow::getMainWindow(const bool useDB)
void MythMainWindow::destroyMainWindow(void)
{
- gCoreContext->SetGUIObject(NULL);
+ if (gCoreContext)
+ gCoreContext->SetGUIObject(NULL);
delete mainWin;
mainWin = NULL;
}

0 comments on commit 922a9ca

Please sign in to comment.