summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-01 12:00:24 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-01 12:00:24 +0300
commitc00d709a545afb14400810f03a8d87d9f4e21302 (patch)
tree8aef4abdb11a21e9c8cc9607f6aeb14c9e4d4906
parent973371680353b176afad13ea852f859785fb4282 (diff)
fixes #4258 (Telegram: occasional crash in Options - Sessions)
-rw-r--r--protocols/Telegram/src/options.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp
index 86f342269a..e9d5f83b9b 100644
--- a/protocols/Telegram/src/options.cpp
+++ b/protocols/Telegram/src/options.cpp
@@ -201,6 +201,8 @@ public:
bool OnInitDialog() override
{
+ m_list.SetExtendedListViewStyleEx(LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
+
LVCOLUMN lvc = {};
lvc.mask = LVCF_TEXT | LVCF_WIDTH;
@@ -235,6 +237,9 @@ public:
void onContextMenu(CContextMenuPos *pos)
{
+ if (pos->iCurr == -1)
+ return;
+
HMENU hMenu = CreatePopupMenu();
AppendMenuW(hMenu, MF_STRING, 100, TranslateT("Kill session"));