]> granicus.if.org Git - handbrake/commitdiff
theora: fix a crash when enctheoraClose is called and pv is NULL.
authorDamiano Galassi <damiog@gmail.com>
Sat, 16 Dec 2017 08:49:38 +0000 (09:49 +0100)
committerDamiano Galassi <damiog@gmail.com>
Sat, 16 Dec 2017 08:49:38 +0000 (09:49 +0100)
libhb/enctheora.c

index 390b52177330aa6a822058b346d55b00fce56ce2..00b4d18ebedf7947576c22bb7cc3cced29638256 100644 (file)
@@ -190,6 +190,11 @@ void enctheoraClose( hb_work_object_t * w )
 {
     hb_work_private_t * pv = w->private_data;
 
+    if (pv == NULL)
+    {
+        return;
+    }
+
     th_encode_free( pv->ctx );
 
     if( pv->file )