From e2b56fe71d467e897b46d0930aacc34f03c7178c Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 10 Apr 2019 16:09:04 +0100 Subject: [PATCH] ecore drm2 - handle possible NULL fb when doing a flip --- src/lib/ecore_drm2/ecore_drm2_fb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 017f981693..e8f6c16762 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -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]))