Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't leave an invalid pointer when deleting the main stack
  • Loading branch information
Lawrence Rust authored and stuartm committed Jul 6, 2012
1 parent 2699d86 commit bfbd67b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -635,8 +635,11 @@ void MythMainWindow::AddScreenStack(MythScreenStack *stack, bool main)

void MythMainWindow::PopScreenStack()
{
delete d->stackList.back();
MythScreenStack *stack = d->stackList.back();
d->stackList.pop_back();
if (stack == d->mainStack)
d->mainStack = NULL;
delete stack;
}

int MythMainWindow::GetStackCount(void)
Expand Down

0 comments on commit bfbd67b

Please sign in to comment.