Fix uninitialized pointer in CNxTKWindow

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4706 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-05-07 02:37:24 +00:00
parent 69f4e02c17
commit f478d3f6b1
3 changed files with 15 additions and 4 deletions

View File

@ -26,4 +26,6 @@
some lesser used feature over time in order to reduce the NxWidgets
footprint.
* CNxWidget: Removed support for reference constants and close types.
The goal is to ge the base widget class as small as possible.
The goal is to ge the base widget class as small as possible.
* CNxTkWindow: Fix uninitialized pointer value.

View File

@ -66,9 +66,18 @@ using namespace NXWidgets;
*/
CNxTkWindow::CNxTkWindow(NXHANDLE hNxServer, CWidgetControl *pWidgetControl)
: CCallback(pWidgetControl), m_hNxServer(hNxServer), m_hNxTkWindow(0),
m_widgetControl(pWidgetControl)
: CCallback(pWidgetControl)
{
// Save construction values
m_hNxServer = hNxServer;
m_widgetControl = pWidgetControl;
// Nullify uninitilized pointers
m_hNxTkWindow = (NXTKWINDOW )0;
m_toolbar = (CNxToolbar *)0;
// Create the CGraphicsPort instance for this window
m_widgetControl->createGraphicsPort(static_cast<INxWindow*>(this));

View File

@ -115,7 +115,7 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height,
nxtk_setsubwindows(fwnd);
/* Then redraw the entire window, even the client window must be
* redraw because it has changed its vertical position and size.
* redrawn because it has changed its vertical position and size.
*/
nxfe_redrawreq(&fwnd->wnd, &fwnd->wnd.bounds);