Add warning for the working directory. Verify win64 fix.

This commit is contained in:
Lee Thomason
2012-03-24 12:49:03 -07:00
parent a3bdeeb110
commit 7f7b162b6f
3 changed files with 35 additions and 6 deletions

View File

@@ -1408,9 +1408,14 @@ void XMLDocument::SaveFile( const char* filename )
#if defined(_MSC_VER)
#pragma warning ( pop )
#endif
XMLPrinter stream( fp );
Print( &stream );
fclose( fp );
if ( fp ) {
XMLPrinter stream( fp );
Print( &stream );
fclose( fp );
}
else {
SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, filename, 0 );
}
}