[MPlayer-cvslog] r33380 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Thu May 5 18:50:39 CEST 2011


Author: reimar
Date: Thu May  5 18:50:38 2011
New Revision: 33380

Log:
Move m_config_free last, otherwise mp_msg might stop working
if options it uses are freed/reset.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Thu May  5 17:54:35 2011	(r33379)
+++ trunk/mplayer.c	Thu May  5 18:50:38 2011	(r33380)
@@ -729,11 +729,6 @@ void exit_player_with_rc(enum exit_reaso
 
   current_module="exit_player";
 
-// free mplayer config
-  if(mconfig)
-    m_config_free(mconfig);
-  mconfig = NULL;
-
   if(mpctx->playtree_iter)
     play_tree_iter_free(mpctx->playtree_iter);
   mpctx->playtree_iter = NULL;
@@ -762,6 +757,12 @@ void exit_player_with_rc(enum exit_reaso
   }
   mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize);
 
+  // must be last since e.g. mp_msg uses option values
+  // that will be freed by this.
+  if(mconfig)
+    m_config_free(mconfig);
+  mconfig = NULL;
+
   exit(rc);
 }
 


More information about the MPlayer-cvslog mailing list