display error on failure to load .obj file
This commit is contained in:
1 parent
698c7e99b7
commit
bead7f9690
1 file changed
+5
-1
+5
-1
@@ -68,7 +68,11 @@ Viewer::Viewer(const char * filename)
|
||||
{
|
||||
m_dist = 5.0;
|
||||
m_dragging = false;
|
||||
m_obj.load(filename);
|
||||
if (!m_obj.load(filename))
|
||||
{
|
||||
cerr << "Error loading " << filename << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Print out the object's size */
|
||||
const float * aabb = m_obj.getAABB();
|
||||
|
||||
Reference in new issue
Block a user