GLView: Return false if the surface could not be created
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 16 Mar 2015 07:38:20 +0000 (16:38 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 16 Mar 2015 07:40:08 +0000 (16:40 +0900)
Apps had no easy mean to check that their chosen configuration
was actually working.

@fix

src/lib/elm_glview.c

index ffb2c8c..b48d332 100644 (file)
@@ -387,7 +387,11 @@ _elm_glview_mode_set(Eo *obj, Elm_Glview_Data *sd, Elm_GLView_Mode mode)
    sd->mode = mode;
 
    _glview_update_surface(obj);
-   elm_glview_changed_set(obj);
+   if (!sd->surface)
+     {
+        ERR("Failed to create a surface with the requested configuration.");
+        return EINA_FALSE;
+     }
 
    return EINA_TRUE;
 }