]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix crash when processing appcast
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 24 May 2010 17:26:38 +0000 (17:26 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 24 May 2010 17:26:38 +0000 (17:26 +0000)
If the network read request fails to return any data, I referenced a NULL pointer.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3321 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index 682b90cf6a755cc36473affaf666b924683694f4..0b4cd5b94ce17facbda05e8e3663b2758007da77 100644 (file)
@@ -4730,7 +4730,10 @@ ghb_net_recv_cb(GIOChannel *ioc, GIOCondition cond, gpointer data)
        }
        if (status == G_IO_STATUS_EOF)
        {
-               ud->appcast[ud->appcast_len] = 0;
+               if ( ud->appcast != NULL )
+               {
+                       ud->appcast[ud->appcast_len] = 0;
+               }
                ghb_net_close(ioc);
                process_appcast(ud);
                return FALSE;