]> git.sesse.net Git - mlt/commitdiff
fix possible null pointer dereferences (coverity-709399)
authorDan Dennedy <dan@dennedy.org>
Fri, 17 Aug 2012 06:29:49 +0000 (23:29 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 17 Aug 2012 06:29:49 +0000 (23:29 -0700)
src/modules/kino/filehandler.cc

index 845a6915776b6cf9ece48df7a17894b3508f8645..697c7e6c15a780b41f7e0882b45eb5cdd57bccf7 100644 (file)
@@ -512,14 +512,14 @@ bool AVIHandler::Create( const string& filename )
 
        case AVI_DV1_FORMAT:
                fail_null( avi = new AVI1File );
-               if ( avi->Create( filename.c_str() ) == false )
+               if ( !avi || avi->Create( filename.c_str() ) == false )
                        return false;
                //avi->Init( videoInfo.isPAL ? AVI_PAL : AVI_NTSC, audioInfo.frequency, AVI_LARGE_INDEX );
                break;
 
        case AVI_DV2_FORMAT:
                fail_null( avi = new AVI2File );
-               if ( avi->Create( filename.c_str() ) == false )
+               if ( !avi || avi->Create( filename.c_str() ) == false )
                        return false;
                //if ( GetOpenDML() )
                        //avi->Init( videoInfo.isPAL ? AVI_PAL : AVI_NTSC, audioInfo.frequency,