try to fix segfault with --enable-cleanup

This commit is contained in:
Jacek Jendrzej
2017-02-17 12:11:03 +01:00
parent 4bfe34bf5d
commit e908858c19

View File

@@ -118,17 +118,24 @@ CMoviePlayerGui::CMoviePlayerGui()
CMoviePlayerGui::~CMoviePlayerGui() CMoviePlayerGui::~CMoviePlayerGui()
{ {
//playback->Close();
if (this == instance_mp) if (this == instance_mp)
stopPlayBack(); stopPlayBack();
delete moviebrowser; if(moviebrowser){
moviebrowser = NULL; delete moviebrowser;
delete filebrowser; moviebrowser = NULL;
filebrowser = NULL; }
delete bookmarkmanager; if(filebrowser){
bookmarkmanager = NULL; delete filebrowser;
delete playback; filebrowser = NULL;
playback = NULL; }
if(bookmarkmanager){
delete bookmarkmanager;
bookmarkmanager = NULL;
}
if(playback){
delete playback;
playback = NULL;
}
if (this == instance_mp) { if (this == instance_mp) {
delete instance_bg; delete instance_bg;
instance_bg = NULL; instance_bg = NULL;