ecore pipe - fix windows to not segv on zero data in pipe there
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 24 Apr 2018 06:13:57 +0000 (15:13 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 29 May 2018 06:57:57 +0000 (15:57 +0900)
src/lib/ecore/ecore_pipe.c

index 92127b9..f9aa626 100644 (file)
@@ -591,6 +591,11 @@ _ecore_pipe_handler_call(Ecore_Pipe *p,
                          unsigned char *buf,
                          size_t len)
 {
+   // on windows we seem to get a pipe wake with no data. don't pass on
+   // zero data as there is nothing useful to do with it... and it causes
+   // segfaults
+   if ((!buf) || (!len)) return;
+
    void *data = (void*) p->data;
 
    // clear all values of pipe first.