summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource-engine.cpp
diff options
context:
space:
mode:
authorVsevolod Buzinov <ext-vsevolod.buzinov@nokia.com>2010-07-16 14:09:35 +0300
committerVsevolod Buzinov <ext-vsevolod.buzinov@nokia.com>2010-07-16 14:09:35 +0300
commit431231ccb8b24b74e45a787e39da335641a76f8a (patch)
treee4adf459c3e9d991dad5dc7e09ea82a6ff92a741 /libresourceqt/src/resource-engine.cpp
parent612c109e25608a6cefb1debbb5c08f8ea540b215 (diff)
downloadlibresourceqt-431231ccb8b24b74e45a787e39da335641a76f8a.tar.gz
Added null-check for disconnectFromManager() to fix bug 177254
Diffstat (limited to 'libresourceqt/src/resource-engine.cpp')
-rw-r--r--libresourceqt/src/resource-engine.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libresourceqt/src/resource-engine.cpp b/libresourceqt/src/resource-engine.cpp
index 7687b8f..7efcb6e 100644
--- a/libresourceqt/src/resource-engine.cpp
+++ b/libresourceqt/src/resource-engine.cpp
@@ -275,12 +275,11 @@ bool ResourceEngine::disconnectFromManager()
// messageMap.insert(requestId, RESMSG_UNREGISTER);
- int r = resconn_disconnect(libresourceSet, &resourceMessage,
- statusCallbackHandler);
- if (r)
- return true;
- else
- return false;
+ bool ret = true;
+ if (libresourceSet != NULL) {
+ r = resconn_disconnect(libresourceSet, &resourceMessage, statusCallbackHandler) != 0;
+ }
+ return ret;
}
bool ResourceEngine::toBeDeleted()