From: Gerd von Egidy Date: Thu, 17 Dec 2015 09:27:38 +0000 (+0100) Subject: check if status_set != NULL before setting it X-Git-Tag: v2.8~4 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=d00589a0ae3b87d8d4048f77610713f049f136f5;p=libi2ncommon check if status_set != NULL before setting it --- diff --git a/src/pipestream.cpp b/src/pipestream.cpp index d6bf13a..c475a50 100644 --- a/src/pipestream.cpp +++ b/src/pipestream.cpp @@ -53,8 +53,10 @@ inpipebuf::~inpipebuf() if (pipe != NULL) { int pclose_exit = pclose (pipe); - if (exit_status && pclose_exit != -1) { - *status_set = true; + if (exit_status && pclose_exit != -1) + { + if (status_set) + *status_set = true; *exit_status = pclose_exit; } @@ -138,8 +140,10 @@ outpipebuf::~outpipebuf() if (pipe != NULL) { int pclose_exit = pclose (pipe); - if (exit_status && pclose_exit != -1) { - *status_set = true; + if (exit_status && pclose_exit != -1) + { + if (status_set) + *status_set = true; *exit_status = pclose_exit; }