diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index cf88c37f38..1914817dc5 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -8443,7 +8443,8 @@ BPoseView::SwitchDir(const entry_ref* newDirRef, AttributeStreamNode* node) // check if model is a trash dir, if so // update ContainerWindow's fIsTrash, etc. // variables to indicate new state - ContainerWindow()->UpdateIfTrash(model); + if (ContainerWindow() != NULL) + ContainerWindow()->UpdateIfTrash(model); StopWatching(); ClearPoses(); @@ -8462,14 +8463,14 @@ BPoseView::SwitchDir(const entry_ref* newDirRef, AttributeStreamNode* node) if (viewStateRestored) { if (ViewMode() == kListMode && oldMode != kListMode) { - if (ContainerWindow()) + if (ContainerWindow() != NULL) ContainerWindow()->ShowAttributeMenu(); fTitleView->Show(); } else if (ViewMode() != kListMode && oldMode == kListMode) { fTitleView->Hide(); - if (ContainerWindow()) + if (ContainerWindow() != NULL) ContainerWindow()->HideAttributeMenu(); } else if (ViewMode() == kListMode && oldMode == kListMode) fTitleView->Invalidate(); @@ -8501,7 +8502,7 @@ BPoseView::SwitchDir(const entry_ref* newDirRef, AttributeStreamNode* node) // be sure this happens after origin is set and window is sized // properly for proper icon caching! - if (ContainerWindow()->IsTrash()) + if (ContainerWindow() != NULL && ContainerWindow()->IsTrash()) AddTrashPoses(); else AddPoses(TargetModel());