evas, ecore: fix crash when sdl doesn't init properly.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jul 2012 08:16:03 +0000 (08:16 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jul 2012 08:16:03 +0000 (08:16 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@73400 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_sdl/evas_engine.c

index 149eab0..f822f3a 100644 (file)
@@ -63,13 +63,17 @@ eng_output_free(void *data)
    Render_Engine *re;
 
    re = (Render_Engine *)data;
-   evas_gl_common_context_free(re->gl_context);
-   free(re);
 
-   evas_common_font_shutdown();
-   evas_common_image_shutdown();
+   if (re)
+     {
+       evas_gl_common_context_free(re->gl_context);
+       free(re);
+
+       evas_common_font_shutdown();
+       evas_common_image_shutdown();
 
-   SDL_QuitSubSystem(SDL_INIT_VIDEO);
+       SDL_QuitSubSystem(SDL_INIT_VIDEO);
+     }
 }
 
 static void