From f4e11483e799824747d458f88775713de26320da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 5 Jun 2024 11:29:46 +0300 Subject: NewStrory: fix for occasional crash --- plugins/NewStory/src/history_control.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 468591f541..8531236cef 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -784,7 +784,8 @@ void NewstoryListData::Paint(simpledib::dib &dib) // draw html itself litehtml::position clip(xPos, yPos, cachedWindowWidth - xPos, iItemHeigth); - pItem->m_doc->draw((UINT_PTR)dib.hdc(), xPos, yPos + iOffsetY, &clip); + if (pItem->m_doc) + pItem->m_doc->draw((UINT_PTR)dib.hdc(), xPos, yPos + iOffsetY, &clip); // draw border HPEN hpn = (HPEN)SelectObject(dib, CreatePen(PS_SOLID, 1, clLine)); -- cgit v1.2.3