From b13a2a3b9ad1ca79399ce00a32d221e18eaf4234 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 7 Dec 2018 21:41:19 +0100 Subject: [PATCH] cc_draw.cpp: remove consequently all possible pixbuf contents This should enusre a clean content for all fbdata.pixbuf parts. --- src/gui/components/cc_draw.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index d25afafe3..794372a8a 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -400,12 +400,18 @@ bool CCDraw::clearFbGradientData() bool CCDraw::clearScreenBuffer() { bool ret = false; - if (clearSavedScreen()) - ret = true; - if (clearPaintCache()) - ret = true; + + for(size_t i =0; i< v_fbdata.size() ;i++) { + if (v_fbdata[i].pixbuf){ + dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], cleanup pixbuf...\033[0m\n", __func__, __LINE__); + delete[] v_fbdata[i].pixbuf; + v_fbdata[i].pixbuf = NULL; + ret = true; + } + } if (clearFbGradientData()) ret = true; + firstPaint = true; return ret; }