diff --git a/api/gutil.cpp b/api/gutil.cpp index 6a3fa80c18..2295fae35a 100755 --- a/api/gutil.cpp +++ b/api/gutil.cpp @@ -397,6 +397,7 @@ int read_ppm_file(char* name, int& w, int& h, unsigned char** arrayp) { int i; f = fopen(name, "rb"); + if (!f) return -1; do {fgets(buf, 256, f);} while (buf[0] == '#'); if (buf[0] != 'P') { return -1; diff --git a/client/main.C b/client/main.C index e518932739..928ecf7fa9 100644 --- a/client/main.C +++ b/client/main.C @@ -144,7 +144,9 @@ int main(int argc, char** argv) { signal(SIGHUP, quit_client); signal(SIGINT, quit_client); signal(SIGQUIT, quit_client); +#ifdef SIGPWR signal(SIGPWR, quit_client); +#endif signal(SIGTSTP, susp_client); signal(SIGCONT, resume_client); #endif