summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history_menus.cpp5
1 files changed, 3 insertions, 2 deletions
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);