diff --git a/src/osgPlugins/shp/XBaseParser.cpp b/src/osgPlugins/shp/XBaseParser.cpp index d9c563c6b..977c22508 100644 --- a/src/osgPlugins/shp/XBaseParser.cpp +++ b/src/osgPlugins/shp/XBaseParser.cpp @@ -87,13 +87,12 @@ XBaseParser::XBaseParser(const std::string fileName): if (fileName.empty() == false) { #ifdef WIN32 - if( (fd = open( fileName.c_str(), O_RDONLY | O_BINARY )) <= 0 ) + if( (fd = open( fileName.c_str(), O_RDONLY | O_BINARY )) < 0 ) #else - if( (fd = ::open( fileName.c_str(), O_RDONLY )) <= 0 ) + if( (fd = ::open( fileName.c_str(), O_RDONLY )) < 0 ) #endif { perror( fileName.c_str() ); - if (fd) close( fd ); return; } }