mirror of https://github.com/arendst/Tasmota.git
Berry prevent crash when setting static variable for solidified class
This commit is contained in:
parent
53457058f7
commit
3b90a68799
|
@ -346,10 +346,12 @@ bbool be_class_setmember(bvm *vm, bclass *o, bstring *name, bvalue *src)
|
|||
{
|
||||
bvalue v;
|
||||
be_assert(name != NULL);
|
||||
bclass * obj = class_member(vm, o, name, &v);
|
||||
if (obj && !var_istype(&v, MT_VARIABLE)) {
|
||||
be_map_insertstr(vm, obj->members, name, src);
|
||||
return btrue;
|
||||
if (!gc_isconst(o)) {
|
||||
bclass * obj = class_member(vm, o, name, &v);
|
||||
if (obj && !var_istype(&v, MT_VARIABLE)) {
|
||||
be_map_insertstr(vm, obj->members, name, src);
|
||||
return btrue;
|
||||
}
|
||||
}
|
||||
return bfalse;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue