From d3df305fe7b2f0c3420c6835032e27619b65a75f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 23 Jul 2019 20:35:26 +0300 Subject: occasional crash fix in Clist_modern --- plugins/Clist_modern/src/modern_cachefuncs.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index e0d6444fbe..cdaea88e47 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -511,6 +511,9 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) void Cache_GetNthLineText(ClcData *dat, ClcCacheEntry *pdnce, int n) { + if (pdnce == nullptr) + return; + wchar_t Text[240 - EXTRA_ICON_COUNT]; Text[0] = 0; ClcLineInfo &line = (n == 2) ? g_plugin.secondLine : g_plugin.thirdLine; wchar_t* &szText = (n == 2) ? pdnce->szSecondLineText : pdnce->szThirdLineText; -- cgit v1.2.3