diff options
-rw-r--r-- | src/lib/VSDXPages.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/VSDXPages.cpp b/src/lib/VSDXPages.cpp index 12c6c0b..178ba9b 100644 --- a/src/lib/VSDXPages.cpp +++ b/src/lib/VSDXPages.cpp @@ -51,11 +51,14 @@ libvisio::VSDXPage::~VSDXPage() libvisio::VSDXPage &libvisio::VSDXPage::operator=(const libvisio::VSDXPage &page) { - m_pageWidth = page.m_pageWidth; - m_pageHeight = page.m_pageHeight; - m_currentPageID = page.m_currentPageID; - m_backgroundPageID = page.m_backgroundPageID; - m_pageElements = page.m_pageElements; + if (this == &page) + { + m_pageWidth = page.m_pageWidth; + m_pageHeight = page.m_pageHeight; + m_currentPageID = page.m_currentPageID; + m_backgroundPageID = page.m_backgroundPageID; + m_pageElements = page.m_pageElements; + } return *this; } |