summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-05-26 16:51:11 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-05-26 16:51:11 +0000
commite13cda27515a6a528a515e41ddd97a116bf80da3 (patch)
tree937047b42c74fb24098278531170955e87de313d
parentf04d3710278e0dd5451e99a4969caf9d1a6a5092 (diff)
downloadstarshatter-e13cda27515a6a528a515e41ddd97a116bf80da3.zip
starshatter-e13cda27515a6a528a515e41ddd97a116bf80da3.tar.gz
starshatter-e13cda27515a6a528a515e41ddd97a116bf80da3.tar.bz2
Adding a missing error message here.
-rw-r--r--Magic2/ModelFileOBJ.cpp5
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;