]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed crash in <sub/sup> handling (bug #1545152)
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 29 Aug 2006 21:08:39 +0000 (21:08 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 29 Aug 2006 21:08:39 +0000 (21:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/m_layout.cpp

index 07b483b7d063fd325b6da18bd33968f9e08be773..f8f5c34931c592efba7be615dedb3fbf8f981800 100644 (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);