diff options
Diffstat (limited to 'Magic2/ModelFileOBJ.cpp')
-rw-r--r-- | Magic2/ModelFileOBJ.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Magic2/ModelFileOBJ.cpp b/Magic2/ModelFileOBJ.cpp index ee618b7..ae7a2a0 100644 --- a/Magic2/ModelFileOBJ.cpp +++ b/Magic2/ModelFileOBJ.cpp @@ -256,6 +256,11 @@ ModelFileOBJ::Load(Model* m, double scale) FILE* fp = fopen(filename, "rb");
+ if (fp == NULL) {
+ ::MessageBox(0, "Wavefront/OBJ Import Failed: Unable to open file", "ERROR", MB_OK);
+ return false;
+ }
+
// ok, now start reading the data:
int ntex = 0;
int nverts = 0;
|