Skip to content

Commit

Permalink
Fix using destroyed temporary object. (mltframework#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Jan 2, 2019
1 parent 06722b0 commit 8462220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/qt/qimage_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ extern void make_tempfile( producer_qimage self, const char *xml )
if ( tempFile.open() )
{
// Write the svg into the temp file
char *fullname = tempFile.fileName().toUtf8().data();
QByteArray fullname = tempFile.fileName().toUtf8();

// Strip leading crap
while ( xml[0] != '<' )
Expand All @@ -349,10 +349,10 @@ extern void make_tempfile( producer_qimage self, const char *xml )
remaining_bytes -= tempFile.write( xml + strlen( xml ) - remaining_bytes, remaining_bytes );
tempFile.close();

mlt_properties_set( self->filenames, "0", fullname );
mlt_properties_set( self->filenames, "0", fullname.data() );

mlt_properties_set_data( MLT_PRODUCER_PROPERTIES( &self->parent ), "__temporary_file__",
fullname, 0, ( mlt_destructor )unlink, NULL );
fullname.data(), 0, ( mlt_destructor )unlink, NULL );
}
}

Expand Down

0 comments on commit 8462220

Please sign in to comment.