From bfa0935cd39ea157b21fc42d9e8ad7df35ddc137 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 20 Apr 2014 12:00:20 +0200 Subject: [PATCH] Fix build error in DataProviderManager Check deref result to see if it's 0, this fixes a build error on Mer. --- src/libhawaii/dataprovidermanager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libhawaii/dataprovidermanager.cpp b/src/libhawaii/dataprovidermanager.cpp index f23016d..bd2be23 100644 --- a/src/libhawaii/dataprovidermanager.cpp +++ b/src/libhawaii/dataprovidermanager.cpp @@ -143,9 +143,7 @@ void DataProviderManager::unloadProvider(const QString &name) // it when the nobody is using it anymore if (d->providers.contains(name)) { DataProvider *provider = d->providers.value(name); - provider->d_ptr->refCount.deref(); - - if (provider->d_ptr->refCount == 0) { + if (!provider->d_ptr->refCount.deref()) { d->providers.remove(name); delete provider; }