diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 365e453844..b2692d4e90 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -3382,7 +3382,8 @@ BContainerWindow::AddMimeTypesToMenu(BMenu *menu) BPath path; if (TargetModel() != NULL) { TargetModel()->GetPath(&path); - if (strstr(path.Path(), "/" kQueryTemplates "/") != NULL) { + if (path.InitCheck() == B_OK + && strstr(path.Path(), "/" kQueryTemplates "/") != NULL) { // demangle MIME type name BString name(TargetModel()->Name()); name.ReplaceFirst('_', '/');