summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorvan <[email protected]>2008-06-01 20:58:33 +0000
committervan <[email protected]>2008-06-01 20:58:33 +0000
commit175365770e7eba988d6e5e794e5ea2a1950db0fb (patch)
treec83702643871a9b6fc94910049ffad11782c948d /libhb/stream.c
parent65d002280e24c4e25363c43b39b33bb672cf022a (diff)
Don't crash during scan when source not recognized (bug found & fixed by John Stebbins)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1485 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rwxr-xr-xlibhb/stream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index c6dce850b..019475d1b 100755
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -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 );