ecore pipe - fix windows to not segv on zero data in pipe there

This commit is contained in:
Carsten Haitzler 2018-04-24 15:13:57 +09:00
parent 3e3462f0d3
commit 4917910b49
1 changed files with 5 additions and 0 deletions

View 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.