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:12:25 -04:00
parent 247a35bd0a
commit 29c145bcbe
+4 -2
View File
@@ -199,22 +199,24 @@ 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();
}
} }