video: Check for valid FB pointer before clearing
[platform/kernel/u-boot.git] / drivers / video / cfb_console.c
index 9388859..26f673a 100644 (file)
@@ -2293,6 +2293,8 @@ int video_get_screen_columns(void)
 
 void video_clear(void)
 {
+       if (!video_fb_address)
+               return;
 #ifdef VIDEO_HW_RECTFILL
        video_hw_rectfill(VIDEO_PIXEL_SIZE,     /* bytes per pixel */
                          0,                    /* dest pos x */