aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorPaul Tagliamonte <paultag@fluxbox.org>2011-11-11 14:29:57 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-01-04 06:43:21 (GMT)
commit0f994dbb28e2a348f7c254e051622acf88e08226 (patch)
tree09d698eada6e44a3426336ce90fddf82c5411e17 /src/FbTk
parenta2cf6fff7b94cea7be87bb4e175c662c8c50a117 (diff)
downloadfluxbox_paul-0f994dbb28e2a348f7c254e051622acf88e08226.zip
fluxbox_paul-0f994dbb28e2a348f7c254e051622acf88e08226.tar.bz2
No need to check if a pointer is null before de-allocating it.
5.3.5/2 of the C++ standard: "In either alternative, if the value of the operand of delete is the null pointer the operation has no effect."
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/MultiButtonMenuItem.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/FbTk/MultiButtonMenuItem.cc b/src/FbTk/MultiButtonMenuItem.cc
index 1b61a99..f5b9990 100644
--- a/src/FbTk/MultiButtonMenuItem.cc
+++ b/src/FbTk/MultiButtonMenuItem.cc
@@ -41,8 +41,7 @@ MultiButtonMenuItem::MultiButtonMenuItem(int buttons, const FbTk::BiDiString &la
41} 41}
42 42
43MultiButtonMenuItem::~MultiButtonMenuItem() { 43MultiButtonMenuItem::~MultiButtonMenuItem() {
44 if (m_button_exe != 0) 44 delete [] m_button_exe;
45 delete [] m_button_exe;
46} 45}
47 46
48void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command<void> > &cmd) { 47void MultiButtonMenuItem::setCommand(int button, FbTk::RefCount<FbTk::Command<void> > &cmd) {