]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_factory.c
mlt_factory.c: guard against setting mlt_environment before it is available
[mlt] / src / framework / mlt_factory.c
index cd19b158df71a1af3e8a2ad83744fe032ab94953..0b4508c505b2a8615fb1333cb989dd5edd48213f 100644 (file)
@@ -147,7 +147,10 @@ char *mlt_environment( const char *name )
 
 int mlt_environment_set( const char *name, const char *value )
 {
-       return mlt_properties_set( global_properties, name, value );
+       if ( global_properties )
+               return mlt_properties_set( global_properties, name, value );
+       else
+               return -1;
 }
 
 static void set_common_properties( mlt_properties properties, mlt_profile profile, const char *type, const char *service )