r20625 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 19 09:31:29 UTC 2015


Author: fschmid
Date: Sat Dec 19 09:31:29 2015
New Revision: 20625

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20625
Log:
Fixed crash with newest poppler-0.39

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20625&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Sat Dec 19 09:31:29 2015
@@ -1267,7 +1267,7 @@
 		groupEntry gElements = m_groupStack.pop();
 		if (gElements.Items.count() > 0)
 		{
-			if ((gElements.Items.count() != 1) && (checkClip()))
+			if ((gElements.Items.count() > 1) && (checkClip()))
 			{
 				tmpSel->clear();
 				for (int dre = 0; dre < gElements.Items.count(); ++dre)
@@ -1276,22 +1276,25 @@
 					m_Elements->removeAll(gElements.Items.at(dre));
 				}
 				PageItem *ite = m_doc->groupObjectsSelection(tmpSel);
-				ite->ClipEdited = true;
-				ite->FrameType = 3;
-				FPointArray out = m_currentClipPath.copy();
-				out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
-				out.translate(-ite->xPos(), -ite->yPos());
-				ite->PoLine = out.copy();
-				ite->setTextFlowMode(PageItem::TextFlowDisabled);
-				m_doc->AdjustItemSize(ite, true);
-				m_doc->resizeGroupToContents(ite);
-				ite->OldB2 = ite->width();
-				ite->OldH2 = ite->height();
-				m_Elements->append(ite);
-				if (m_groupStack.count() != 0)
-				{
-					applyMask(ite);
-					m_groupStack.top().Items.append(ite);
+				if (ite)
+				{
+					ite->ClipEdited = true;
+					ite->FrameType = 3;
+					FPointArray out = m_currentClipPath.copy();
+					out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
+					out.translate(-ite->xPos(), -ite->yPos());
+					ite->PoLine = out.copy();
+					ite->setTextFlowMode(PageItem::TextFlowDisabled);
+					m_doc->AdjustItemSize(ite, true);
+					m_doc->resizeGroupToContents(ite);
+					ite->OldB2 = ite->width();
+					ite->OldH2 = ite->height();
+					m_Elements->append(ite);
+					if (m_groupStack.count() != 0)
+					{
+						applyMask(ite);
+						m_groupStack.top().Items.append(ite);
+					}
 				}
 				tmpSel->clear();
 			}




More information about the scribus-commit mailing list