Looks like _lv_refr_get_disp_refreshing can return NULL during the app startup.
changing second line to if(d && d->driver && d->driver->screen_transp) helped in my case
I have the same issue and have created a pull request. It really strange since it seams to be connected to how many graphical objects that I have instantiated.
https://github.com/lvgl/lv_drivers/blob/57494ff8ec012fb6ea0a6d2e3c9485bace392d34/sdl/sdl.c#L370-L371
Looks like
_lv_refr_get_disp_refreshing
can return NULL during the app startup. changing second line toif(d && d->driver && d->driver->screen_transp)
helped in my case