diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-23 18:22:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-23 18:22:00 +0300 |
commit | c551f8981eba838d07245d1597e9deaa00427cee (patch) | |
tree | 7ad5ac1eeb8800d93a8d95f829670291a21b47ad | |
parent | 5920c144e07d66cdccebc85894649f9b36dc1297 (diff) | |
download | mv-c551f8981eba838d07245d1597e9deaa00427cee.tar.gz mv-c551f8981eba838d07245d1597e9deaa00427cee.tar.bz2 mv-c551f8981eba838d07245d1597e9deaa00427cee.tar.xz mv-c551f8981eba838d07245d1597e9deaa00427cee.zip |
Add missing checks into listeners.
-rw-r--r-- | src/listeners/baselistener.hpp | 3 | ||||
-rw-r--r-- | src/listeners/guitableactionlistener.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/listeners/baselistener.hpp b/src/listeners/baselistener.hpp index 1ba5c3d33..a1fa643ca 100644 --- a/src/listeners/baselistener.hpp +++ b/src/listeners/baselistener.hpp @@ -38,7 +38,8 @@ \ void name::addListener(name *const listener) \ { \ - mListeners.push_back(listener); \ + if (listener) \ + mListeners.push_back(listener); \ } \ \ void name::removeListener(const name *const listener) \ diff --git a/src/listeners/guitableactionlistener.cpp b/src/listeners/guitableactionlistener.cpp index e71abb9b1..d0a2b7a18 100644 --- a/src/listeners/guitableactionlistener.cpp +++ b/src/listeners/guitableactionlistener.cpp @@ -36,7 +36,7 @@ GuiTableActionListener::GuiTableActionListener(GuiTable *const restrict table, mColumn(column), mWidget(widget) { - if (widget) + if (widget && table) { widget->addActionListener(this); widget->setParent(table); |