From 4917910b4911905236fa099bbc16b833b056ca07 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 24 Apr 2018 15:13:57 +0900 Subject: [PATCH] ecore pipe - fix windows to not segv on zero data in pipe there --- src/lib/ecore/ecore_pipe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c index 92127b95d0..f9aa62655a 100644 --- a/src/lib/ecore/ecore_pipe.c +++ b/src/lib/ecore/ecore_pipe.c @@ -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.