From afa65514b75d61b2424b53f0444c92e450b7c8e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Dec 2023 21:54:29 +0300 Subject: fixes #4014 (NewStory: crash on right-click by chat log) --- plugins/NewStory/src/history_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index cd25eb3cca..2a35563195 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -66,7 +66,7 @@ NewstoryListData::NewstoryListData(HWND _1) : void NewstoryListData::OnContextMenu(int index, POINT pt) { - HMENU hMenu = NSMenu_Build(this, LoadItem(index)); + HMENU hMenu = NSMenu_Build(this, (index == -1) ? 0 : LoadItem(index)); if (pMsgDlg != nullptr && pMsgDlg->isChat()) Chat_CreateMenu(hMenu, pMsgDlg->getChat(), nullptr); -- cgit v1.2.3