From 2e52b7bfac7cd0c8c1f7a86f4c0b58d314306954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 12 Jun 2006 17:38:55 +0000 Subject: [PATCH] we now check the index instead of PopSpecifier() for GET_SUPPORTED_SUITES git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17800 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Shelf.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/kits/interface/Shelf.cpp b/src/kits/interface/Shelf.cpp index de2237e43e..74ffd3764c 100644 --- a/src/kits/interface/Shelf.cpp +++ b/src/kits/interface/Shelf.cpp @@ -630,16 +630,9 @@ BShelf::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier, ReplicantAt(i, &replicant, &ID, &err); if (err == B_OK && replicant != NULL) { + if (index <= 0 && msg->what == B_GET_SUPPORTED_SUITES) + return this; msg->PopSpecifier(); - if (msg->what == B_GET_SUPPORTED_SUITES) { - bool popped = msg->PopSpecifier() == B_OK; - msg->SetCurrentSpecifier(index); - if (!popped) { - replicant = NULL; - target = this; - } else - msg->PopSpecifier(); - } } else { BMessage replyMsg(B_MESSAGE_NOT_UNDERSTOOD); replyMsg.AddInt32("error", B_BAD_INDEX);