Commit Graph
1 Commits
Author SHA1 Message Date
MADGameStudio 1fed0800d1 fix: add NULL config check and fallback to defaults in wrenNewVM
When wrenNewVM is called with a NULL config pointer, the previous code
dereferenced it without checking, causing a crash. This commit adds a
NULL guard: if config is NULL, the VM is allocated using the default
reallocator and initialized with default configuration via
wrenInitConfiguration. The gray array allocation and nextGC field now
correctly reference vm->config instead of the potentially NULL config
parameter.
2016-03-03 16:58:50 +00:00