all repos — fluxbox @ 34bf3b4833bcded73646ee5c702dfae52fb8f86b

custom fork of the fluxbox windowmanager

Fixed a possible crash when using a slot m_holder = 0
Henrik Kinnunen fluxgen at fluxbox dot org
commit

34bf3b4833bcded73646ee5c702dfae52fb8f86b

parent

05e64be3bd876b0f31ba79112219458a00551d39

1 files changed, 9 insertions(+), 5 deletions(-)

jump to
M src/FbTk/Slot.hhsrc/FbTk/Slot.hh

@@ -229,7 +229,8 @@ (functor, Callback0<Functor, ReturnType>::functionAddress())) {

} void operator()() { - reinterpret_cast<CallbackType>(m_holder->m_callback)( m_holder ); + if (m_holder) + reinterpret_cast<CallbackType>(m_holder->m_callback)( m_holder ); } };

@@ -247,7 +248,8 @@

} void operator()(Arg1 arg) { - reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg); + if (m_holder) + reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg); } };

@@ -265,7 +267,8 @@

} void operator()(Arg1 arg1, Arg2 arg2) { - reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg1, arg2); + if (m_holder) + reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg1, arg2); } };

@@ -282,8 +285,9 @@

} void operator()(Arg1 arg1, Arg2 arg2, Arg3 arg3) { - reinterpret_cast<CallbackType>(m_holder->m_callback) - ( m_holder, arg1, arg2, arg3 ); + if (m_holder) + reinterpret_cast<CallbackType>(m_holder->m_callback) + ( m_holder, arg1, arg2, arg3 ); } };