From: Bluezery <ohpowel@gmail.com>
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 12 Mar 2012 04:53:47 +0000 (04:53 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 12 Mar 2012 04:53:47 +0000 (04:53 +0000)
Subject: [E-devel] [Patch][ecore_con] Simple bug fix
Date: Mon, 12 Mar 2012 13:45:02 +0900

Hello,

This is patch to prevent a segfault if curlmsg == NULL.

Thanks.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@69217 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con_url.c

index 7047713..05f0678 100644 (file)
@@ -1312,7 +1312,10 @@ _ecore_con_url_event_url_complete(Ecore_Con_Url *url_con, CURLMsg *curlmsg)
         if (!url_con->status)
           _ecore_con_url_status_get(url_con);
      }
-   else ERR("Curl message have errors: %d", curlmsg->data.result);
+   else if (curlmsg)
+     ERR("Curl message have errors: %d", curlmsg->data.result);
+   else
+     CRIT("THIS IS BAD.");
 
    e->status = url_con->status;
    e->url_con = url_con;