From: Václav Slavík Date: Tue, 29 Aug 2006 21:08:39 +0000 (+0000) Subject: fixed crash in handling (bug #1545152) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/198d7c6cb9f892732037c017b448d3dd9e258a55 fixed crash in handling (bug #1545152) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index 07b483b7d0..f8f5c34931 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -406,7 +406,8 @@ TAG_HANDLER_BEGIN(SUBSUP, "SUB,SUP") wxHtmlCell *c = cont->GetLastChild(); m_WParser->SetScriptMode(issub ? wxHTML_SCRIPT_SUB : wxHTML_SCRIPT_SUP); - m_WParser->SetScriptBaseline(oldbase + c->GetScriptBaseline()); + m_WParser->SetScriptBaseline( + oldbase + c ? c->GetScriptBaseline() : 0); // select smaller font m_WParser->SetFontSize(m_WParser->GetFontSize()-2);