From 0701ae9e794bf32506a2eb667233c70f50e4fb87 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Tue, 17 Aug 2004 15:04:53 +0000 Subject: [PATCH] NULL accpectance for connect/disconnect git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@373 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt_service.c | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/framework/mlt_service.c b/src/framework/mlt_service.c index 4a36c8d..14ae45f 100644 --- a/src/framework/mlt_service.c +++ b/src/framework/mlt_service.c @@ -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. -- 1.7.4.4