fix(disp): fix missing null pointer judgment
@@ -136,7 +136,12 @@ lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
*/
void lv_disp_set_theme(lv_disp_t * disp, lv_theme_t * th)
{
- if(disp == NULL) disp = lv_disp_get_default();
+ if(!disp) disp = lv_disp_get_default();
+ if(!disp) {
+ LV_LOG_WARN("no display registered");
+ return;
+ }
+
disp->theme = th;
if(disp->screen_cnt == 3 &&
