fixed bad pointer check

This commit is contained in:
fluxgen 2003-01-10 02:16:29 +00:00
parent 44ffacb0df
commit 6072177888

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Button.cc,v 1.3 2002/12/25 11:27:29 fluxgen Exp $
// $Id: Button.cc,v 1.4 2003/01/10 02:16:29 fluxgen Exp $
#include "Button.hh"
@ -132,7 +132,8 @@ void Button::buttonReleaseEvent(XButtonEvent &event) {
event.x > width() || event.y > height())
return;
if (event.button > 0 && event.button <= 5)
if (event.button > 0 && event.button <= 5 &&
m_onclick[event.button -1].get() != 0)
m_onclick[event.button - 1]->execute();
}