Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed hopefully the ScrollArea segfault. Fixes #45
The Gui now sets the VisibilityEventHandler to Null when it is destructed. That should prevent segfaults that are occured by Widgets that sends Events after Fifechan is destructed.
  • Loading branch information
helios2000 committed Jan 23, 2017
1 parent 28c6e65 commit 9bceb0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/gui.cpp
Expand Up @@ -131,6 +131,7 @@ namespace fcn
{
setTop(NULL);
}
Widget::_setVisibilityEventHandler(NULL);
Widget::_setGuiDeathListener(NULL);

delete mFocusHandler;
Expand Down
4 changes: 1 addition & 3 deletions src/widgets/scrollarea.cpp
Expand Up @@ -145,9 +145,7 @@ namespace fcn

ScrollArea::~ScrollArea()
{
// Is this really needed? Commented out for the moment, because it tends to segmentation faults.
// See widget.cpp clear()
//setContent(NULL);
setContent(NULL);
}

void ScrollArea::setContent(Widget* widget)
Expand Down

0 comments on commit 9bceb0c

Please sign in to comment.