OSDN Git Service

Don't crash during scan when source not recognized (bug found & fixed by John Stebbins)
authorvan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 1 Jun 2008 20:58:33 +0000 (20:58 +0000)
committervan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 1 Jun 2008 20:58:33 +0000 (20:58 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@1485 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/stream.c

index c6dce85..019475d 100755 (executable)
@@ -492,7 +492,10 @@ hb_stream_t * hb_stream_open( char *path, hb_title_t *title )
             return d;
         }
     }
-    fclose( d->file_handle );
+    if ( d->file_handle )
+    {
+        fclose( d->file_handle );
+    }
     if (d->path)
     {
         free( d->path );