r14302 by jghali - #8509 (part of) : fix crash on application startup by doing some sanity checks on prefs loading
scribus-commit
scribus-commit at lists.scribus.net
Wed Nov 18 00:55:20 CET 2009
Revision: 14302
Author: jghali
Date: 2009-11-17T15:30:50.910095Z
Commit message: #8509 (part of) : fix crash on application startup by doing some sanity checks on prefs loading
Changeset:
M /branches/Version135/Scribus/scribus/prefsmanager.cpp
Diffs:
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp (revision 14301)
+++ scribus/prefsmanager.cpp (revision 14302)
@@ -2358,7 +2358,13 @@
}
DOC=DOC.nextSibling();
}
+ // Some sanity checks
appPrefs.DColors.ensureBlackAndWhite();
+ if ((appPrefs.FacingPages < 0) || (appPrefs.FacingPages >= appPrefs.pageSets.count()))
+ appPrefs.FacingPages = 0;
+ if ((appPrefs.docUnitIndex < UNITMIN) || (appPrefs.docUnitIndex > UNITMAX))
+ appPrefs.docUnitIndex = int(SC_POINTS);
+ // Configure GUI
appPrefs.GUIsystem = qApp->style()->objectName();
if (appPrefs.GUI.length() > 0)
{
More information about the scribus-commit
mailing list