OSDN Git Service

LinGui: fix crash when processing appcast
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Mon, 24 May 2010 17:26:38 +0000 (17:26 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
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://localhost/HandBrake/trunk@3321 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index 682b90c..0b4cd5b 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;