diff options
Diffstat (limited to 'common')
-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 | ||