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
This commit is contained in:
@@ -3382,7 +3382,8 @@ BContainerWindow::AddMimeTypesToMenu(BMenu *menu)
|
|||||||
BPath path;
|
BPath path;
|
||||||
if (TargetModel() != NULL) {
|
if (TargetModel() != NULL) {
|
||||||
TargetModel()->GetPath(&path);
|
TargetModel()->GetPath(&path);
|
||||||
if (strstr(path.Path(), "/" kQueryTemplates "/") != NULL) {
|
if (path.InitCheck() == B_OK
|
||||||
|
&& strstr(path.Path(), "/" kQueryTemplates "/") != NULL) {
|
||||||
// demangle MIME type name
|
// demangle MIME type name
|
||||||
BString name(TargetModel()->Name());
|
BString name(TargetModel()->Name());
|
||||||
name.ReplaceFirst('_', '/');
|
name.ReplaceFirst('_', '/');
|
||||||
|
|||||||
Reference in New Issue
Block a user