diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-16 17:00:45 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-16 17:00:45 +0100 |
commit | b1c4f94606b6a1b9223acb2c1722bfe3bce26933 (patch) | |
tree | 617862dab9b676d45b39059b9187b5766c36f448 /common/clientapi.h | |
parent | 5d246d2bea8f2330d86cdb0b14c76f6b6ceb7ec1 (diff) | |
download | sink-b1c4f94606b6a1b9223acb2c1722bfe3bce26933.tar.gz sink-b1c4f94606b6a1b9223acb2c1722bfe3bce26933.zip |
--potentialMemoryLeak;
Diffstat (limited to 'common/clientapi.h')
-rw-r--r-- | common/clientapi.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index fe60d9c..6054130 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -76,7 +76,10 @@ namespace async { | |||
76 | 76 | ||
77 | QSharedPointer<ResultEmitter<T> > emitter() | 77 | QSharedPointer<ResultEmitter<T> > emitter() |
78 | { | 78 | { |
79 | mResultEmitter = QSharedPointer<ResultEmitter<T> >(new ResultEmitter<T>()); | 79 | if (!mResultEmitter) { |
80 | mResultEmitter = QSharedPointer<ResultEmitter<T> >(new ResultEmitter<T>()); | ||
81 | } | ||
82 | |||
80 | return mResultEmitter; | 83 | return mResultEmitter; |
81 | } | 84 | } |
82 | 85 | ||