summaryrefslogtreecommitdiffstats
path: root/libhb/decvobsub.c
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2017-01-09 09:18:03 +0100
committerDamiano Galassi <[email protected]>2017-01-09 09:18:03 +0100
commit008b1f47941e6479e5db106653232fb886196238 (patch)
tree42968663d2e5c2810e6790992fa4454a1a05aa1e /libhb/decvobsub.c
parentbcf44aad7103116507eedaa66ca8103c97b2d32b (diff)
libhb: check if decvobsub.c private_data is not null before accessing one of its member. Fix a crash when calling decsubClose if the decoder had not been initialized yet.
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r--libhb/decvobsub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c
index 73401b9f3..009c12e96 100644
--- a/libhb/decvobsub.c
+++ b/libhb/decvobsub.c
@@ -196,7 +196,7 @@ void decsubClose( hb_work_object_t * w )
{
hb_work_private_t * pv = w->private_data;
- if ( pv->buf )
+ if ( pv && pv->buf )
hb_buffer_close( &pv->buf );
free( w->private_data );
}