summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/SVGTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/src/SVGTree.cpp')
-rw-r--r--dviware/dvisvgm/src/SVGTree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dviware/dvisvgm/src/SVGTree.cpp b/dviware/dvisvgm/src/SVGTree.cpp
index edfb926d0c..74b6913b20 100644
--- a/dviware/dvisvgm/src/SVGTree.cpp
+++ b/dviware/dvisvgm/src/SVGTree.cpp
@@ -330,11 +330,11 @@ void SVGTree::pushPageContext (unique_ptr<SVGElement> node) {
}
-/** Pops the current context element and restored the previous one. */
+/** Pops the current context element and restores the previous one. */
void SVGTree::popPageContext () {
if (!_pageContextStack.empty())
_pageContextStack.pop();
- _charHandler->setInitialContextNode(_page);
+ _charHandler->setInitialContextNode(_pageContextStack.empty() ? _page : _pageContextStack.top());
}