evas_gl_cocoa: fix segmentation fault at program exit
authorJean Guyomarc'h <jean.guyomarch@gmail.com>
Sat, 2 Apr 2016 20:19:29 +0000 (22:19 +0200)
committerJean Guyomarc'h <jean.guyomarch@gmail.com>
Sat, 2 Apr 2016 20:27:12 +0000 (22:27 +0200)
Programs crashed on a segmentation fault when the last window was
closed. The eng_output_idle_flush() function was removed... but
since gl_cocoa does not properly use *_generic modules, the
output_idle_flush() function called by the render engine was
garbage (hence the segfault).

Now nothing is done... but at least we don't crash anymore.

src/modules/evas/engines/gl_cocoa/evas_engine.c

index 31bc120..215cf53 100644 (file)
@@ -1119,6 +1119,11 @@ evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const
 
 #endif 
 
+static void
+eng_output_idle_flush(void *data EINA_UNUSED)
+{
+}
+
 static void *
 eng_gl_api_get(void *data, int version EINA_UNUSED)
 {
@@ -1337,7 +1342,7 @@ module_open(Evas_Module *em)
    ORD(context_cutout_add);
    ORD(context_cutout_clear);
    ORD(output_flush);
-   //   ORD(output_idle_flush);
+   ORD(output_idle_flush);
    //   ORD(output_dump);
    ORD(rectangle_draw);
    ORD(line_draw);