evas, ecore: fix crash when sdl doesn't init properly.

SVN revision: 73400
This commit is contained in:
Cedric BAIL 2012-07-06 08:16:03 +00:00
parent ed473fb3ca
commit e468bdd391
2 changed files with 10 additions and 6 deletions

View File

@ -643,7 +643,7 @@ ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int nofram
if (!rmethod) return NULL;
ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, fullscreen, 0, noframe, 0);
ee->driver = "gl_sdl";
if (ee) ee->driver = "gl_sdl";
return ee;
}
#else

View 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);
SDL_QuitSubSystem(SDL_INIT_VIDEO);
evas_common_font_shutdown();
evas_common_image_shutdown();
SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
}
static void