try to fix segfault with --enable-cleanup

Origin commit data
------------------
Branch: ni/coolstream
Commit: e908858c19
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-02-17 (Fri, 17 Feb 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2017-02-17 12:11:03 +01:00
parent cb5ab71294
commit b59d0fa8f9

View File

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