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,23 +199,25 @@ DesktopPoseView::ShowVolumes(bool visible, bool showShared)
void void
DesktopPoseView::StartSettingsWatch() DesktopPoseView::StartSettingsWatch()
{ {
be_app->LockLooper(); if (be_app->LockLooper()) {
be_app->StartWatching(this, kShowDisksIconChanged); be_app->StartWatching(this, kShowDisksIconChanged);
be_app->StartWatching(this, kVolumesOnDesktopChanged); be_app->StartWatching(this, kVolumesOnDesktopChanged);
be_app->StartWatching(this, kDesktopIntegrationChanged); be_app->StartWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper(); be_app->UnlockLooper();
} }
}
void void
DesktopPoseView::StopSettingsWatch() DesktopPoseView::StopSettingsWatch()
{ {
be_app->LockLooper(); if (be_app->LockLooper()) {
be_app->StopWatching(this, kShowDisksIconChanged); be_app->StopWatching(this, kShowDisksIconChanged);
be_app->StopWatching(this, kVolumesOnDesktopChanged); be_app->StopWatching(this, kVolumesOnDesktopChanged);
be_app->StopWatching(this, kDesktopIntegrationChanged); be_app->StopWatching(this, kDesktopIntegrationChanged);
be_app->UnlockLooper(); be_app->UnlockLooper();
} }
}
void void