]> git.sesse.net Git - mlt/commitdiff
consumer_sdl.c: bugfix segfault on unchecked pointer
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 23 Jan 2009 01:36:44 +0000 (01:36 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 23 Jan 2009 01:36:44 +0000 (01:36 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1323 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/sdl/consumer_sdl.c

index e8e0eb30f8b4c91b1872b79971017fdcc998f042..30ec118f6e48b11f3d1af3ec73f55fd91b2d7569 100644 (file)
@@ -252,7 +252,8 @@ int consumer_stop( mlt_consumer parent )
                // Kill the thread and clean up
                this->joined = 1;
                this->running = 0;
-               pthread_join( this->thread, NULL );
+               if ( this->thread )
+                       pthread_join( this->thread, NULL );
 
                // internal cleanup
                if ( this->sdl_overlay != NULL )