[haiku-commits] r35307 - haiku/trunk/src/apps/mediaplayer

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 27 Jan 2010 01:22:49 +0100 (CET)

Author: korli
Date: 2010-01-27 01:22:48 +0100 (Wed, 27 Jan 2010)
New Revision: 35307
Changeset: http://dev.haiku-os.org/changeset/35307/haiku

Modified:
   haiku/trunk/src/apps/mediaplayer/MainWin.cpp
Log:
* avoids crashing when fPlayList is already gone on quitting.


Modified: haiku/trunk/src/apps/mediaplayer/MainWin.cpp
===================================================================
--- haiku/trunk/src/apps/mediaplayer/MainWin.cpp        2010-01-26 23:34:23 UTC 
(rev 35306)
+++ haiku/trunk/src/apps/mediaplayer/MainWin.cpp        2010-01-27 00:22:48 UTC 
(rev 35307)
@@ -290,6 +290,7 @@
                fPlaylistWindow->Quit();
 
        delete fPlaylist;
+       fPlaylist = NULL;
 
        // quit the Controller looper thread
        thread_id controllerThread = fController->Thread();
@@ -1057,6 +1058,8 @@
                playlistArchive.AddInt64("position", 
fController->TimePosition());
                controllerLocker.Unlock();
 
+               if (!fPlaylist)
+                       return;
                BAutolock playlistLocker(fPlaylist);
                if (fPlaylist->Archive(&playlistArchive) != B_OK
                        || playlistArchive.AddInt32("index",


Other related posts:

  • » [haiku-commits] r35307 - haiku/trunk/src/apps/mediaplayer - korli