commit | 7f7b162b6f0ef7157a265bf81952281306989014 | [log] [tgz] |
---|---|---|
author | Lee Thomason <leethomason@gmail.com> | Sat Mar 24 12:49:03 2012 -0700 |
committer | Lee Thomason <leethomason@gmail.com> | Sat Mar 24 12:49:03 2012 -0700 |
tree | 757e3a4c4b214dea936a933d05c85a03db38fba2 | |
parent | a3bdeeb1106c6ac880b535feecb35919785f8a86 [diff] [blame] |
Add warning for the working directory. Verify win64 fix.
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 8ee8ca2..5e5b93d 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1408,9 +1408,14 @@ #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 ); + } }