Hi, I recently encountered a crash in Kdenlive using the ClipInfo class to retrieve a playlist clip details.
Fix seems trivial but I prefer to ask before committing. The crash happens when using the Playlist::clip_info method on a clip that has no resource. In my case, I was with using a clip from the kdenlivetitle producer, which does not set a resource. Not having a resource crashes when ClipInfo::update tries to make a strdup of the resource. Patch below fixes the crash: diff --git a/src/mlt++/MltPlaylist.cpp b/src/mlt++/MltPlaylist.cpp index 5676060..111d3f5 100644 --- a/src/mlt++/MltPlaylist.cpp +++ b/src/mlt++/MltPlaylist.cpp @@ -71,7 +71,7 @@ void ClipInfo::update( 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; Ok to commit ? Best regards jb ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel