From a86406d090c63ad4e8dbe74a762e339749d1f376 Mon Sep 17 00:00:00 2001 From: Michael <13953785+Laserlicht@users.noreply.github.com> Date: Thu, 20 Jul 2023 02:20:54 +0200 Subject: [PATCH] check list length --- client/lobby/SelectionTab.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index 84db0448d..b55bd70cf 100644 --- a/client/lobby/SelectionTab.cpp +++ b/client/lobby/SelectionTab.cpp @@ -326,17 +326,17 @@ void SelectionTab::clickDouble(const Point & cursorPosition) void SelectionTab::showPopupWindow(const Point & cursorPosition) { - if(!curItems.size()) - return; - int position = getLine(); int py = position + slider->getValue(); - + + if(py >= curItems.size()) + return; + std::string text = "{" + curItems[py]->getName() + "}\n\n" + curItems[py]->fileURI; - + if(curItems[py]->date != "") text += "\n\n" + curItems[py]->date; - + CRClickPopup::createAndPush(text); }