NULL accpectance for connect/disconnect
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 17 Aug 2004 15:04:53 +0000 (15:04 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 17 Aug 2004 15:04:53 +0000 (15:04 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@373 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_service.c

index 4a36c8d..14ae45f 100644 (file)
@@ -137,11 +137,14 @@ int mlt_service_connect_producer( mlt_service this, mlt_service producer, int in
 
 static void mlt_service_disconnect( mlt_service this )
 {
-       // Get the service base
-       mlt_service_base *base = this->local;
+       if ( this != NULL )
+       {
+               // Get the service base
+               mlt_service_base *base = this->local;
 
-       // There's a bit more required here...
-       base->out = NULL;
+               // There's a bit more required here...
+               base->out = NULL;
+       }
 }
 
 /** Obtain the consumer this service is connected to.
@@ -173,11 +176,14 @@ mlt_service mlt_service_producer( mlt_service this )
 
 static void mlt_service_connect( mlt_service this, mlt_service that )
 {
-       // Get the service base
-       mlt_service_base *base = this->local;
+       if ( this != NULL )
+       {
+               // Get the service base
+               mlt_service_base *base = this->local;
 
-       // There's a bit more required here...
-       base->out = that;
+               // There's a bit more required here...
+               base->out = that;
+       }
 }
 
 /** Get the first connected producer service.