From 20f0b03fa3bf443337e80120c061f01b263c7898 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 20 May 2014 18:42:26 +0200 Subject: [PATCH] minor --- src/shapes/serialized.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shapes/serialized.cpp b/src/shapes/serialized.cpp index 4b0ed3da..74b15bde 100644 --- a/src/shapes/serialized.cpp +++ b/src/shapes/serialized.cpp @@ -154,6 +154,7 @@ public: /// When the file contains multiple meshes, this index specifies which one to load int shapeIndex = props.getInteger("shapeIndex", 0); + AssertEx(shapeIndex >= 0, "Shape index must be nonnegative!"); std::string name = (props.getID() != "unnamed") ? props.getID() : formatString("%s@%i", filePath.stem().string().c_str(), shapeIndex);