summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-20 17:31:55 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-20 17:31:55 +0100
commita0f87f055629f21d43d6c58eabf3c978547e6f08 (patch)
tree08d4cf32d28bc487fbe532ea07ff06807b82ccb2 /src
parent3684ef0bc0eeb05477a30f4d3bfba01d957b0292 (diff)
fix page referencing itself as its background page
Change-Id: I70d91a8f2f72cba6cd6ce4a3427af98edb6d0a4a
Diffstat (limited to 'src')
-rw-r--r--src/lib/VSDContentCollector.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index a3cd0f1..87a5042 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -2762,6 +2762,10 @@ void libvisio::VSDContentCollector::endPage()
{
_handleLevelChange(0);
_flushCurrentPage();
+ // TODO: this check does not prevent two pages mutually referencing themselves
+ // as their background pages. Or even longer cycle of pages.
+ if (m_currentPage.m_backgroundPageID == m_currentPage.m_currentPageID)
+ m_currentPage.m_backgroundPageID = MINUS_ONE;
if (m_isBackgroundPage)
m_pages.addBackgroundPage(m_currentPage);
else