Skip to content

Commit

Permalink
Fix build error in DataProviderManager
Browse files Browse the repository at this point in the history
Check deref result to see if it's 0, this fixes a build error on Mer.
  • Loading branch information
plfiorini committed Apr 20, 2014
1 parent 0738656 commit bfa0935
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libhawaii/dataprovidermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bfa0935

Please sign in to comment.