[MPlayer-cvslog] r37685 - trunk/playtree.c

reimar subversion at mplayerhq.hu
Thu Feb 11 23:01:58 CET 2016


Author: reimar
Date: Thu Feb 11 23:01:58 2016
New Revision: 37685

Log:
playtree.c: Allow free of NULL pointer.

Simplifies use and is consistent with
other free functions.

Modified:
   trunk/playtree.c

Modified: trunk/playtree.c
==============================================================================
--- trunk/playtree.c	Thu Feb 11 22:59:55 2016	(r37684)
+++ trunk/playtree.c	Thu Feb 11 23:01:58 2016	(r37685)
@@ -51,9 +51,7 @@ void
 play_tree_free(play_tree_t* pt, int children) {
   play_tree_t* iter;
 
-#ifdef MP_DEBUG
-  assert(pt != NULL);
-#endif
+  if (!pt) return;
 
   if(children) {
     for(iter = pt->child; iter != NULL; ) {


More information about the MPlayer-cvslog mailing list