only try to write timecodes if the open was successful

pull/2077/head
Isaac Connor 2017-11-22 12:13:28 -08:00
parent 3c55daaf36
commit 0eb2ae60f3
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,8 @@ bool Event::WriteFrameVideo( const Image *image, const struct timeval timestamp,
}
/* Add the frame to the timecodes file */
fprintf(timecodes_fd, "%u\n", timeMS);
if ( timecodes_fd )
fprintf(timecodes_fd, "%u\n", timeMS);
return( true );
}