mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-05-08 14:51:35 +02:00
Guard against bad indexes in User::_from_dict().
This commit is contained in:
parent
f59632a7d3
commit
0e79057d11
@ -249,7 +249,9 @@ void User::_from_dict(const Dictionary &dict) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int index = mdict["index"];
|
int index = mdict["index"];
|
||||||
|
|
||||||
|
ERR_CONTINUE(index < 0 || index >= _modules.size());
|
||||||
|
|
||||||
Ref<UserModule> m = _modules[index];
|
Ref<UserModule> m = _modules[index];
|
||||||
|
|
||||||
ERR_CONTINUE(!m.is_valid());
|
ERR_CONTINUE(!m.is_valid());
|
||||||
|
Loading…
Reference in New Issue
Block a user