]> git.mxchange.org Git - simgear.git/blobdiff - simgear/xml/easyxml.cxx
Fix VS2010 lack of fminf
[simgear.git] / simgear / xml / easyxml.cxx
index bdb1358b46e5ba626da5cce88abcd7eff86fe6f2..2a6953593df74132e08ec779a71511ad5618afd2 100644 (file)
@@ -24,7 +24,8 @@
 #include <iostream>
 
 using std::ifstream;
-
+using std::istream;
+using std::string;
 
 \f
 ////////////////////////////////////////////////////////////////////////
@@ -140,8 +141,10 @@ XMLAttributesDefault::setValue (const char * name, const char * value)
 
 void XMLVisitor::savePosition(void)
 {
-  column = XML_GetCurrentColumnNumber(parser);
-  line = XML_GetCurrentLineNumber(parser);
+  if (parser) {
+    column = XML_GetCurrentColumnNumber(parser);
+    line = XML_GetCurrentLineNumber(parser);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////////