r14290 by jghali - #8582, importing SVG into the attached SLA crashes Scribus The crash was caused by import code supposing the existence of layer with id = 0. May not be the case if background layer has been deleted...

scribus-commit scribus-commit at lists.scribus.net
Fri Nov 13 22:55:21 CET 2009


Revision: 14290
Author: jghali
Date: 2009-11-13T14:01:46.484159Z
Commit message: #8582, importing SVG into the attached SLA crashes Scribus
The crash was caused by import code supposing the existence of layer with id = 0. May not be the case if background layer has been deleted...

Changeset: 
M  /branches/Version135/Scribus/scribus/scribusXml.cpp

Diffs:
Index: scribus/scribusXml.cpp
===================================================================
--- scribus/scribusXml.cpp	(revision 14289)
+++ scribus/scribusXml.cpp	(revision 14290)
@@ -930,7 +930,9 @@
 
 bool ScriXmlDoc::ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view)
 {
-	return ReadElemToLayer(fileName,avail,doc,Xp,Yp,Fi,loc,FontSub,view,0);
+	// Do not suppose the existence of layer with id = 0
+	// return ReadElemToLayer(fileName, avail, doc, Xp, Yp, Fi, loc, FontSub, view, 0);
+	return ReadElemToLayer(fileName, avail, doc, Xp, Yp, Fi, loc, FontSub, view, doc->activeLayer());
 }
 
 bool ScriXmlDoc::ReadElemToLayer(QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ScribusView *view, int toLayer)




More information about the scribus-commit mailing list