ecore drm2 - handle possible NULL fb when doing a flip

This commit is contained in:
Carsten Haitzler 2019-04-10 16:09:04 +01:00
parent 7b483cb548
commit e2b56fe71d
1 changed files with 10 additions and 0 deletions

View File

@ -510,6 +510,16 @@ _fb_flip(Ecore_Drm2_Output *output)
int ret = 0;
fb = output->prep.fb;
if (!fb)
{
fb = output->pending.fb;
ERR("Trying to flip NULL fb - fallback to pending fb");
}
if (!fb)
{
ERR("Pending fb is also NULL, give up flipping");
return ret;
}
if ((!output->current.fb) ||
(output->current.fb->strides[0] != fb->strides[0]))