fixed crash in <sub/sup> handling (bug #1545152)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-08-29 21:08:39 +00:00
parent 6e28ff0ce7
commit 198d7c6cb9

View File

@@ -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);