aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Slot.hh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/FbTk/Slot.hh b/src/FbTk/Slot.hh
index ba3cfc4..9080d53 100644
--- a/src/FbTk/Slot.hh
+++ b/src/FbTk/Slot.hh
@@ -229,7 +229,8 @@ public:
229 } 229 }
230 230
231 void operator()() { 231 void operator()() {
232 reinterpret_cast<CallbackType>(m_holder->m_callback)( m_holder ); 232 if (m_holder)
233 reinterpret_cast<CallbackType>(m_holder->m_callback)( m_holder );
233 } 234 }
234}; 235};
235 236
@@ -247,7 +248,8 @@ public:
247 } 248 }
248 249
249 void operator()(Arg1 arg) { 250 void operator()(Arg1 arg) {
250 reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg); 251 if (m_holder)
252 reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg);
251 } 253 }
252 254
253}; 255};
@@ -265,7 +267,8 @@ public:
265 } 267 }
266 268
267 void operator()(Arg1 arg1, Arg2 arg2) { 269 void operator()(Arg1 arg1, Arg2 arg2) {
268 reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg1, arg2); 270 if (m_holder)
271 reinterpret_cast<CallbackType>(m_holder->m_callback)(m_holder, arg1, arg2);
269 } 272 }
270}; 273};
271 274
@@ -282,8 +285,9 @@ public:
282 } 285 }
283 286
284 void operator()(Arg1 arg1, Arg2 arg2, Arg3 arg3) { 287 void operator()(Arg1 arg1, Arg2 arg2, Arg3 arg3) {
285 reinterpret_cast<CallbackType>(m_holder->m_callback) 288 if (m_holder)
286 ( m_holder, arg1, arg2, arg3 ); 289 reinterpret_cast<CallbackType>(m_holder->m_callback)
290 ( m_holder, arg1, arg2, arg3 );
287 } 291 }
288}; 292};
289 293