diff --git a/code/AssetLib/glTF/glTFCommon.h b/code/AssetLib/glTF/glTFCommon.h index 78d40ce2c..14b82aa29 100644 --- a/code/AssetLib/glTF/glTFCommon.h +++ b/code/AssetLib/glTF/glTFCommon.h @@ -300,7 +300,7 @@ public: inline unsigned int GetIndex() const { return index; } - operator bool() const { return vector != 0; } + operator bool() const { return vector != nullptr && index < vector->size(); } T *operator->() { return (*vector)[index]; }