r22301 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 29 22:29:50 UTC 2017


Author: jghali
Date: Fri Dec 29 22:29:50 2017
New Revision: 22301

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22301
Log:
Fix Coverity 1350550 / 1350551 (v3)

Modified:
    trunk/Scribus/scribus/guidemanagercore.cpp

Modified: trunk/Scribus/scribus/guidemanagercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22301&path=/trunk/Scribus/scribus/guidemanagercore.cpp
==============================================================================
--- trunk/Scribus/scribus/guidemanagercore.cpp	(original)
+++ trunk/Scribus/scribus/guidemanagercore.cpp	Fri Dec 29 22:29:50 2017
@@ -242,16 +242,17 @@
 {
 	Guides guides;
 	int value = m_horizontalAutoCount;
+	
 	if (page == NULL)
 		page = m_page;
 	if (page == NULL)
 		return guides;
-	double newPageHeight = page->height();
 	if (m_horizontalAutoCount == 0)
 		return guides;
 	++value;
 
 	double offset = 0.0;
+	double newPageHeight = page->height();
 	if (m_horizontalAutoRefer == 1)
 	{
 		newPageHeight = newPageHeight - page->Margins.top() - page->Margins.bottom();
@@ -289,16 +290,17 @@
 {
 	Guides guides;
 	int value = m_verticalAutoCount;
+	
 	if (page == NULL)
 		page = m_page;
 	if (page == NULL)
 		return guides;
-	double newPageWidth = page->width();
 	if (m_verticalAutoCount == 0)
 		return guides;
 	++value;
 
 	double offset = 0.0;
+	double newPageWidth = page->width();
 	if (m_verticalAutoRefer == 1)
 	{
 		newPageWidth = newPageWidth - page->Margins.left() - page->Margins.right();




More information about the scribus-commit mailing list