diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 639853bfd0..ee99ab098a 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -2674,12 +2674,11 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*) PoseView()->ConvertToScreen(&global); PoseView()->CommitActivePose(); - if (ref) { + if (ref != NULL) { // clicked on a pose, show file or volume context menu Model model(ref); if (model.IsTrash()) { - if (fTrashContextMenu->Window() || Dragging()) return; @@ -2693,7 +2692,6 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref* ref, BView*) SetupNavigationMenu(ref, fTrashContextMenu); fTrashContextMenu->Go(global, true, true, true); } else { - bool showAsVolume = false; bool filePanel = PoseView()->IsFilePanel(); @@ -3072,9 +3070,9 @@ BContainerWindow::BuildMimeTypeList(BObjectList &mimeTypes) if (pose->TargetModel()->IsSymLink()) { Model* resolved = new Model( pose->TargetModel()->EntryRef(), true, true); - if (resolved->InitCheck() == B_OK) { + if (resolved->InitCheck() == B_OK) AddMimeTypeString(mimeTypes, resolved); - } + delete resolved; } } @@ -3096,7 +3094,7 @@ BContainerWindow::BuildAddOnMenu(BMenu* menu) return; menu = item->Submenu(); - if (!menu) + if (menu == NULL) return; menu->SetFont(be_plain_font); diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index 2a869337d8..1ce74a3635 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -184,7 +184,7 @@ OpenWithContainerWindow::NewPoseView(Model*, BRect rect, uint32) OpenWithPoseView* OpenWithContainerWindow::PoseView() const { - ASSERT(dynamic_cast(fPoseView)); + ASSERT(dynamic_cast(fPoseView) != NULL); return static_cast(fPoseView); } diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index 9914b233ae..ef650dd320 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -1030,7 +1030,7 @@ TTracker::OpenContainerWindow(Model* model, BMessage* originalRefsList, if (originalRefsList == NULL) { // when passing just a single model, stuff it's entry in a single // element list anyway - ASSERT(model); + ASSERT(model != NULL); refList = new BMessage; refList->AddRef("refs", model->EntryRef()); delete model;