diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-29 17:19:18 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-29 17:19:18 +0300 |
commit | 4f591aa09025880f17bb8292a7dc174c14c29236 (patch) | |
tree | a6453f9f0fe0f3baa90fd55ae9e4d3b312032493 /plugins | |
parent | 585c4d7595173e805523799b737bfd3044468fcd (diff) |
fixes #3979 (NewStory: падение при ПКМ по пустому журналу)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewStory/src/history_menus.cpp | 5 |
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); |