From 107d2b333b14d044ba044461f30a07ea5f1ed475 Mon Sep 17 00:00:00 2001 From: "Bruno G. Albuquerque" Date: Sun, 26 Apr 2009 15:52:01 +0000 Subject: [PATCH] Only try to add the preferred app if it can be found, otherwise the Open With menu would be completelly empty. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30430 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/OpenWithWindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kits/tracker/OpenWithWindow.cpp b/src/kits/tracker/OpenWithWindow.cpp index f463c95389..42f9843629 100644 --- a/src/kits/tracker/OpenWithWindow.cpp +++ b/src/kits/tracker/OpenWithWindow.cpp @@ -590,10 +590,9 @@ AddOneRefSignatures(const entry_ref *ref, void *castToIterator) // add preferred app for file, if any if (model.PreferredAppSignature()[0]) { - queryIterator->PushUniqueSignature(model.PreferredAppSignature()); - // got one, mark it as preferred for this node if (be_roster->FindApp(model.PreferredAppSignature(), &preferredRef) == B_OK) { + queryIterator->PushUniqueSignature(model.PreferredAppSignature()); preferredAppFromNode = true; queryIterator->TrySettingPreferredAppForFile(&preferredRef); }