From 0a32b5f3bc1bf76b6de81988282fa27635bcf68c Mon Sep 17 00:00:00 2001 From: Ralf Gerlich Date: Wed, 2 Jan 2008 23:55:13 -0800 Subject: [PATCH] Avoid SIGSEGV in fgfs-tools-client when the results file is not found. --- src/BuildTiles/Parallel/client.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/BuildTiles/Parallel/client.cxx b/src/BuildTiles/Parallel/client.cxx index c19e763c..1c3734e5 100644 --- a/src/BuildTiles/Parallel/client.cxx +++ b/src/BuildTiles/Parallel/client.cxx @@ -286,6 +286,10 @@ bool construct_tile( const SGBucket& b, system( command.c_str() ); FILE *fp = fopen( result_file.c_str(), "r" ); + if ( fp == NULL) { + cout << "Missing results file " << result_file << endl; + return false; + } char line[256]; while ( fgets( line, 256, fp ) != NULL ) { string line_str = line;