]> git.sesse.net Git - mlt/commitdiff
Fkx crash converting string property with null value.
authorDan Dennedy <dan@dennedy.org>
Tue, 19 Oct 2010 04:16:42 +0000 (21:16 -0700)
committerDan Dennedy <dan@dennedy.org>
Tue, 19 Oct 2010 04:16:42 +0000 (21:16 -0700)
src/framework/mlt_property.c

index 7cbb6819a2b9c0aa0f1a0823340dd9bbe5a5c364..ec6b16713d6689532929683d6a1d067f83735602 100644 (file)
@@ -299,7 +299,7 @@ int mlt_property_get_int( mlt_property this )
                return ( int )this->prop_position;
        else if ( this->types & mlt_prop_int64 )
                return ( int )this->prop_int64;
-       else if ( this->types & mlt_prop_string )
+       else if ( ( this->types & mlt_prop_string ) && this->prop_string )
                return mlt_property_atoi( this->prop_string );
        return 0;
 }
@@ -321,7 +321,7 @@ double mlt_property_get_double( mlt_property this )
                return ( double )this->prop_position;
        else if ( this->types & mlt_prop_int64 )
                return ( double )this->prop_int64;
-       else if ( this->types & mlt_prop_string )
+       else if ( ( this->types & mlt_prop_string ) && this->prop_string )
                return atof( this->prop_string );
        return 0;
 }
@@ -344,7 +344,7 @@ mlt_position mlt_property_get_position( mlt_property this )
                return ( mlt_position )this->prop_double;
        else if ( this->types & mlt_prop_int64 )
                return ( mlt_position )this->prop_int64;
-       else if ( this->types & mlt_prop_string )
+       else if ( ( this->types & mlt_prop_string ) && this->prop_string )
                return ( mlt_position )atol( this->prop_string );
        return 0;
 }
@@ -384,7 +384,7 @@ int64_t mlt_property_get_int64( mlt_property this )
                return ( int64_t )this->prop_double;
        else if ( this->types & mlt_prop_position )
                return ( int64_t )this->prop_position;
-       else if ( this->types & mlt_prop_string )
+       else if ( ( this->types & mlt_prop_string ) && this->prop_string )
                return mlt_property_atoll( this->prop_string );
        return 0;
 }