diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-23 15:49:06 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-23 15:49:06 +0000 |
commit | 24b649553719312f79127bba841818a43a00fd8a (patch) | |
tree | 217f8115528194e63b6b681ed7e2b8746ec1c241 /NxWidgets/libnxwidgets | |
parent | 99cc52c0763dea695fc740ed2dcfaed7468febd5 (diff) | |
download | px4-firmware-24b649553719312f79127bba841818a43a00fd8a.tar.gz px4-firmware-24b649553719312f79127bba841818a43a00fd8a.tar.bz2 px4-firmware-24b649553719312f79127bba841818a43a00fd8a.zip |
Several changes (mostly graphics related) from Petteri Aimonen
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5385 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cnumericedit.cxx | 8 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/ctext.cxx | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnumericedit.cxx b/NxWidgets/libnxwidgets/src/cnumericedit.cxx index e0df014c5..993e86fb8 100644 --- a/NxWidgets/libnxwidgets/src/cnumericedit.cxx +++ b/NxWidgets/libnxwidgets/src/cnumericedit.cxx @@ -158,9 +158,11 @@ CNumericEdit::CNumericEdit(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_ CNumericEdit::~CNumericEdit() { - delete m_label; - delete m_button_minus; - delete m_button_plus; + // CNxWidget destroys all children + + m_label = 0; + m_button_minus = 0; + m_button_plus = 0; } void CNumericEdit::getPreferredDimensions(CRect &rect) const diff --git a/NxWidgets/libnxwidgets/src/ctext.cxx b/NxWidgets/libnxwidgets/src/ctext.cxx index 688031d88..caa0c02e8 100644 --- a/NxWidgets/libnxwidgets/src/ctext.cxx +++ b/NxWidgets/libnxwidgets/src/ctext.cxx @@ -276,11 +276,14 @@ const int CText::getLineTrimmedLength(const int lineNumber) const length--; } while (iterator->moveToPrevious() && (length > 0)); + + delete iterator; return length; } // May occur if data has been horribly corrupted somewhere + delete iterator; return 0; } |