Tracker: Check LockLooper() return value.

Fixes CID602468 and CID602469

Thanks waddlesplash for pointing this out.
This commit is contained in:
John Scipione 2014-07-18 14:10:38 -04:00
parent 247a35bd0a
commit 29c145bcbe

View File

@ -199,22 +199,24 @@ DesktopPoseView::ShowVolumes(bool visible, bool showShared)
void
DesktopPoseView::StartSettingsWatch()
{
be_app->LockLooper();
be_app->StartWatching(this, kShowDisksIconChanged);
be_app->StartWatching(this, kVolumesOnDesktopChanged);
be_app->StartWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper();
if (be_app->LockLooper()) {
be_app->StartWatching(this, kShowDisksIconChanged);
be_app->StartWatching(this, kVolumesOnDesktopChanged);
be_app->StartWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper();
}
}
void
DesktopPoseView::StopSettingsWatch()
{
be_app->LockLooper();
be_app->StopWatching(this, kShowDisksIconChanged);
be_app->StopWatching(this, kVolumesOnDesktopChanged);
be_app->StopWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper();
if (be_app->LockLooper()) {
be_app->StopWatching(this, kShowDisksIconChanged);
be_app->StopWatching(this, kVolumesOnDesktopChanged);
be_app->StopWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper();
}
}