From 4f591aa09025880f17bb8292a7dc174c14c29236 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 29 Nov 2023 17:19:18 +0300 Subject: =?UTF-8?q?fixes=20#3979=20(NewStory:=20=D0=BF=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=20=D0=9F=D0=9A=D0=9C=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=BF=D1=83=D1=81=D1=82=D0=BE=D0=BC=D1=83=20?= =?UTF-8?q?=D0=B6=D1=83=D1=80=D0=BD=D0=B0=D0=BB=D1=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_menus.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/NewStory') diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp index e1801d07f4..2404fa0a6b 100644 --- a/plugins/NewStory/src/history_menus.cpp +++ b/plugins/NewStory/src/history_menus.cpp @@ -34,8 +34,9 @@ static HGENMENU hmiCopy, hmiCopyText, hmiEdit, hmiBookmark, hmiDelete; HMENU NSMenu_Build(NewstoryListData *data, ItemData *item) { bool bNotProtected = true; - if (auto *szProto = Proto_GetBaseAccountName(item->hContact)) - bNotProtected = db_get_b(item->hContact, szProto, "Protected") == 0; + if (item != nullptr) + if (auto *szProto = Proto_GetBaseAccountName(item->hContact)) + bNotProtected = db_get_b(item->hContact, szProto, "Protected") == 0; Menu_ShowItem(hmiCopy, bNotProtected); Menu_ShowItem(hmiCopyText, bNotProtected); -- cgit v1.2.3