Fixed leak when open returns 0
This commit is contained in:
@@ -161,7 +161,7 @@ load_md2 (const char *filename, const osgDB::ReaderWriter::Options* options)
|
||||
}
|
||||
|
||||
file_fd = open (filename, O_RDONLY);
|
||||
if (file_fd <= 0) {
|
||||
if (file_fd < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user