From 3266cd11e5e2a0067ce8b718ffdcd02234b426b4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 1 Jan 2019 21:50:50 +0100 Subject: [PATCH] widget/textbox: cpp: try to fix possible issue while restore screen maybe possible crash Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/17d09474466c10c2d986e6059a44eb5d52cd16d3 Author: Thilo Graf Date: 2019-01-01 (Tue, 01 Jan 2019) ------------------ This commit was generated by Migit --- src/gui/widget/textbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index d169d92b6..bf812c9ce 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -658,7 +658,7 @@ void CTextBox::refreshText(void) } } else{ - if (m_bgpixbuf){ + if (m_bgpixbuf && m_bg_painted){ if (allow_paint_bg){ //TRACE("[CTextBox] %s restore bg %d\r\n", __FUNCTION__, __LINE__); frameBuffer->RestoreScreen(ax, ay, dx, dy, m_bgpixbuf);