diff --git a/src/vm.cpp b/src/vm.cpp index 546d8d0..feb9a73 100644 --- a/src/vm.cpp +++ b/src/vm.cpp @@ -292,6 +292,7 @@ namespace wren { } void VM::variable(const char* module, const char* name, int slot) { + assert(slot_count() >= 1); wrenGetVariable(m_local->wvm, module, name, slot); }