Guard against bad indexes in User::_from_dict().

This commit is contained in:
Relintai 2025-05-04 20:24:42 +02:00
parent f59632a7d3
commit 0e79057d11

View File

@ -250,6 +250,8 @@ void User::_from_dict(const Dictionary &dict) {
int index = mdict["index"];
ERR_CONTINUE(index < 0 || index >= _modules.size());
Ref<UserModule> m = _modules[index];
ERR_CONTINUE(!m.is_valid());