summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-03 14:50:09 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-03 14:53:07 -0300
commit165bc8dcfefe126a68412792724c1e077157cda7 (patch)
tree2b7b3c521195d236c45446d9b897ee3a7444bc46
parent44e9877271e3f6fbbf2212c9ad563b1aca37ef82 (diff)
BaseCallback: No need to check pointer before calling delete when we guarantee the pointer is properly nullfied when appropriate.
-rw-r--r--TelepathyQt/callbacks.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/TelepathyQt/callbacks.h b/TelepathyQt/callbacks.h
index 3e2b95c0..18dd8048 100644
--- a/TelepathyQt/callbacks.h
+++ b/TelepathyQt/callbacks.h
@@ -75,9 +75,7 @@ struct TP_QT_EXPORT BaseCallback
BaseCallback &operator=(const BaseCallback &other)
{
if (caller == other.caller) return *this;
-
- if (caller)
- delete caller;
+ delete caller;
caller = other.caller->clone();
return *this;
}