From 09b8b291767854ec565598c8802930919368c3ef Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 8 Sep 2012 19:39:58 +0200 Subject: [PATCH] CComponents: reset saved_screen.pixbuf It's safe to work with null pointer --- src/gui/components/components.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index cdcf6635d..2d09df660 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -57,6 +57,7 @@ void CComponents::clearSavedScreen() { if (saved_screen.pixbuf) delete[] saved_screen.pixbuf; + saved_screen.pixbuf = NULL; } void CComponents::initVarBasic() @@ -429,6 +430,7 @@ void CComponentsInfoBox::removeLineBreaks(std::string& str) } } + //------------------------------------------------------------------------------------------------------- //sub class CComponentsShapeSquare from CComponentsContainer CComponentsShapeSquare::CComponentsShapeSquare(const int x_pos, const int y_pos, const int w, const int h, bool has_shadow, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow)