From cb492203382e21b52dce512d70efb487715392df Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 12 May 2012 21:12:56 +0000 Subject: NxWM: Fix double deletion of class git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4727 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/nxwm/src/ccalibration.cxx | 5 +++-- NxWidgets/nxwm/src/ctaskbar.cxx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'NxWidgets/nxwm/src') diff --git a/NxWidgets/nxwm/src/ccalibration.cxx b/NxWidgets/nxwm/src/ccalibration.cxx index 4c6a29ed9..1fc9f3466 100644 --- a/NxWidgets/nxwm/src/ccalibration.cxx +++ b/NxWidgets/nxwm/src/ccalibration.cxx @@ -168,8 +168,9 @@ bool CCalibration::run(void) touchscreenInput(sample); } - - return !m_stop; + + m_stop = false; + return true; } /** diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx index 87fa34c3d..9558e47a8 100644 --- a/NxWidgets/nxwm/src/ctaskbar.cxx +++ b/NxWidgets/nxwm/src/ctaskbar.cxx @@ -393,8 +393,12 @@ bool CTaskbar::startApplication(IApplication *app, bool minimized) if (!app->run()) { + // Call stopApplication on a failure to start. This will call + // app->stop() (which is probably not necesary for the application + // but it should be prepared/ to handle it). stopApplication() + // will also removed the icon image from the list and delete it. + stopApplication(app); - image->disable(); return false; } -- cgit v1.2.3