summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-23 20:35:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-23 20:35:26 +0300
commitd3df305fe7b2f0c3420c6835032e27619b65a75f (patch)
treecf59ead155dd9d89c8f1f5bc872760388cff3319 /plugins/Clist_modern
parent47f15dd571c33bee3ee6f08d1a1151bb0b58e548 (diff)
occasional crash fix in Clist_modern
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp3
1 files changed, 3 insertions, 0 deletions
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;