mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix bug in inner class reference, closes #1411
(cherry picked from commit cf6450043d)
This commit is contained in:
committed by
Rémi Verschelde
parent
eaca35adfe
commit
de0b7b871b
@@ -2278,11 +2278,16 @@ bool GDInstance::get(const StringName& p_name, Variant &r_ret) const {
|
||||
}
|
||||
|
||||
{
|
||||
const Map<StringName,Variant>::Element *E = script->constants.find(p_name);
|
||||
if (E) {
|
||||
r_ret=E->get();
|
||||
return true; //index found
|
||||
|
||||
const GDScript *sl = sptr;
|
||||
while(sl) {
|
||||
const Map<StringName,Variant>::Element *E = sl->constants.find(p_name);
|
||||
if (E) {
|
||||
r_ret=E->get();
|
||||
return true; //index found
|
||||
|
||||
}
|
||||
sl=sl->_base;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user