From 7eb2d53b4ce4efc8d9a1e5ab191671e609a315e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 10 Dec 2010 20:06:18 +0000 Subject: [PATCH] Now checks BPath init status before using it, this was crashing the Tracker in #6305. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39810 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/ContainerWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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('_', '/');