fix(obj_style): prevent access to class null pointer
@@ -241,8 +241,13 @@ lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_
cls = cls->base_class;
}
+ if(cls) {
value_act.num = prop == LV_STYLE_WIDTH ? cls->width_def : cls->height_def;
}
+ else {
+ value_act.num = 0;
+ }
+ }
else {
value_act = lv_style_prop_get_default(prop);
}
