Avoid SIGSEGV in fgfs-tools-client when the results file is not found.
This commit is contained in:
parent
cf04dd3135
commit
0a32b5f3bc
1 changed files with 4 additions and 0 deletions
|
@ -286,6 +286,10 @@ bool construct_tile( const SGBucket& b,
|
||||||
system( command.c_str() );
|
system( command.c_str() );
|
||||||
|
|
||||||
FILE *fp = fopen( result_file.c_str(), "r" );
|
FILE *fp = fopen( result_file.c_str(), "r" );
|
||||||
|
if ( fp == NULL) {
|
||||||
|
cout << "Missing results file " << result_file << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
char line[256];
|
char line[256];
|
||||||
while ( fgets( line, 256, fp ) != NULL ) {
|
while ( fgets( line, 256, fp ) != NULL ) {
|
||||||
string line_str = line;
|
string line_str = line;
|
||||||
|
|
Loading…
Add table
Reference in a new issue