r21890 by jghali - #14735: Scribus crash if you save the document as PDF/X-4 or PDF/X-3 and document contains two CMYK pictures

scribus-commit scribus-commit at lists.scribus.net
Thu Apr 13 22:10:58 UTC 2017


Author: jghali
Date: Thu Apr 13 22:10:57 2017
New Revision: 21890

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21890
Log:
#14735: Scribus crash if you save the document as PDF/X-4 or PDF/X-3 and document contains two CMYK pictures

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21890&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Thu Apr 13 22:10:57 2017
@@ -10353,10 +10353,7 @@
 				{
 					ScImage img3;
 					int components = 0;
-					PdfId embeddedProfile = writer.newObject();
-					writer.startObj(embeddedProfile);
 					QByteArray dataP;
-					PdfICCD dataD;
 					if ((Embedded) && (!Options.EmbeddedI))
 						img3.getEmbeddedProfile(fn, &dataP, &components);
 					if ((dataP.isEmpty()) || ((img.imgInfo.colorspace == ColorSpaceGray) && (hasColorEffect) && (components == 1)))
@@ -10400,6 +10397,9 @@
 					}
 					if (!ICCProfiles.contains(profInUse))
 					{
+						PdfICCD dataD;
+						PdfId embeddedProfile = writer.newObject();
+						writer.startObj(embeddedProfile);
 						PutDoc("<<\n");
 						if ((Options.CompressMethod != PDFOptions::Compression_None) && Options.Compress)
 						{




More information about the scribus-commit mailing list