ecore_sdl: avoid crash during shutdown due to Ecore_Event queue.
authorCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Mar 2017 00:13:43 +0000 (16:13 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Fri, 10 Mar 2017 00:17:58 +0000 (16:17 -0800)
src/lib/ecore_sdl/ecore_sdl.c

index 2fee26c..e7302de 100644 (file)
@@ -100,6 +100,11 @@ ecore_sdl_shutdown(void)
 
    SDL_Quit();
 
+   ecore_event_type_flush(ECORE_SDL_EVENT_GOT_FOCUS,
+                          ECORE_SDL_EVENT_LOST_FOCUS,
+                          ECORE_SDL_EVENT_RESIZE,
+                          ECORE_SDL_EVENT_EXPOSE);
+
    ecore_event_shutdown();
    eina_log_domain_unregister(_ecore_sdl_log_dom);
    _ecore_sdl_log_dom = -1;