Check for valid string before trying to write (potentially NULL) to

the pipe.

NB: Fixes Coverity CID1039398

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 14:38:54 +01:00
parent 1d9a19f1ee
commit 6e49578cb7
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ _player_send_str(Emotion_Generic_Video *ev, const char *str, Eina_Bool stringsha
len = str ? eina_stringshare_strlen(str) + 1 : 0;
else
len = str ? strlen(str) + 1 : 0;
ecore_pipe_write(ev->fd_write, str, len);
if (str)
ecore_pipe_write(ev->fd_write, str, len);
}
static Eina_Bool