Free any old input or opaque regions if they exist (regardless of the existance of...
authorChristopher Michael <cp.michael@samsung.com>
Tue, 5 Feb 2013 12:51:38 +0000 (12:51 +0000)
committerRafael Antognolli <rafael.antognolli@linux.intel.com>
Tue, 19 Feb 2013 13:18:02 +0000 (10:18 -0300)
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl_window.c

index f870ac9..19bf9c5 100644 (file)
@@ -248,18 +248,18 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, in
         return;
      }
 
-   if (!win->surface) return;
-
    if (win->region.input)
      {
-        wl_surface_set_input_region(win->surface, win->region.input);
+        if (win->surface)
+          wl_surface_set_input_region(win->surface, win->region.input);
         wl_region_destroy(win->region.input);
         win->region.input = NULL;
      }
 
    if (win->region.opaque)
      {
-        wl_surface_set_opaque_region(win->surface, win->region.opaque);
+        if (win->surface)
+          wl_surface_set_opaque_region(win->surface, win->region.opaque);
         wl_region_destroy(win->region.opaque);
         win->region.opaque = NULL;
      }