widget: reset some object vars to NULL, only for sure

Origin commit data
------------------
Commit: 1d7ce79142
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
This commit is contained in:
2020-01-05 22:22:22 +01:00
committed by vanhofen
parent ed5ffde6e7
commit 0391717c46
5 changed files with 14 additions and 8 deletions

View File

@@ -394,6 +394,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
if (pixBuf)
delete[] pixBuf;
pixBuf = NULL;
if (!parent || force_saveScreen) {
pixBuf = new fb_pixel_t[(width + OFFSET_SHADOW) * (height + OFFSET_SHADOW)];
if (pixBuf)
@@ -916,6 +917,7 @@ int CPLPINInput::exec( CMenuTarget* parent, const std::string & )
{
frameBuffer->RestoreScreen(x - borderwidth, y- borderwidth, width+ 2* borderwidth, height+ 2* borderwidth, pixbuf);
delete[] pixbuf;//Mismatching allocation and deallocation: pixbuf
pixBuf = NULL;
}
return ( res );