MltPlaylist.cpp: prevent strdup from crashing on a null pointer.
[melted] / mlt++ / src / MltPlaylist.cpp
index 350e53b..30fba20 100644 (file)
@@ -44,7 +44,7 @@ ClipInfo::ClipInfo( mlt_playlist_clip_info *info ) :
        producer( new Producer( info->producer ) ),
        cut( new Producer( info->cut ) ),
        start( info->start ),
-       resource( strdup( info->resource ) ),
+       resource( info->resource? strdup( info->resource )  : 0 ),
        frame_in( info->frame_in ),
        frame_out( info->frame_out ),
        frame_count( info->frame_count ),