]> git.sesse.net Git - mlt/commitdiff
fix crash on melt pango:+foo (without .txt)
authorDan Dennedy <dan@dennedy.org>
Sat, 22 Sep 2012 20:28:48 +0000 (13:28 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 22 Sep 2012 20:28:48 +0000 (13:28 -0700)
src/modules/gtk2/producer_pango.c

index 0bd4aeff54faeab23dc35b258f76e98a0399a9af..4969dd2025d6575d9e1222beead30e45bdd21a37 100644 (file)
@@ -169,7 +169,8 @@ mlt_producer producer_pango_init( const char *filename )
                        char *markup = copy;
                        if ( strstr( markup, "/+" ) )
                                markup = strstr( markup, "/+" ) + 2;
-                       ( *strrchr( markup, '.' ) ) = '\0';
+                       if ( strrchr( markup, '.' ) )
+                               ( *strrchr( markup, '.' ) ) = '\0';
                        while ( strchr( markup, '~' ) )
                                ( *strchr( markup, '~' ) ) = '\n';
                        mlt_properties_set( properties, "resource", filename );