summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal.cpp')
-rw-r--r--signal-composer-binding/signal.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/signal-composer-binding/signal.cpp b/signal-composer-binding/signal.cpp
index dcbf814..84be8a7 100644
--- a/signal-composer-binding/signal.cpp
+++ b/signal-composer-binding/signal.cpp
@@ -75,9 +75,8 @@ Signal::Signal(const std::string& id,
Signal::~Signal()
{
- json_object_put(onReceived_->argsJ);
- json_object_put(getSignalsArgs_);
- delete(onReceived_);
+ if(getSignalsArgs_) json_object_put(getSignalsArgs_);
+ if(onReceived_) delete(onReceived_);
}
Signal::operator bool() const