ecore_evas/fb: Also check for NULL argument to strtol()
authorstefan <stefan@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jun 2012 15:01:54 +0000 (15:01 +0000)
committerstefan <stefan@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 14 Jun 2012 15:01:54 +0000 (15:01 +0000)
We can't be sure that disp_name is not NULL here. Better check before handing it over to strtol()

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@72143 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_evas/ecore_evas_fb.c

index 33212c0..3fc8acf 100644 (file)
@@ -639,7 +639,7 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
      }
 
    einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
-   if (einfo)
+   if (einfo && disp_name)
      {
         einfo->info.virtual_terminal = 0;
         einfo->info.device_number = strtol(disp_name, NULL, 10);