r19928 by fschmid - Fixed Bug #12952: Crash with SVM file
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 15 22:04:44 UTC 2015
Author: fschmid
Date: Sun Mar 15 22:04:44 2015
New Revision: 19928
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19928
Log:
Fixed Bug #12952: Crash with SVM file
Modified:
trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
Modified: trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19928&path=/trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp Sun Mar 15 22:04:44 2015
@@ -2085,14 +2085,17 @@
QImage imgM;
imgM.load(ds.device(), "BMP");
imgM = imgM.convertToFormat(QImage::Format_ARGB32);
- for (int ih = 0; ih < img.height(); ih++)
- {
- QRgb *src = (QRgb *)imgM.scanLine(ih);
- QRgb *dst = (QRgb *)img.scanLine(ih);
- for (int iw = 0; iw < img.width(); iw++)
- {
- *dst &= 0x00FFFFFF;
- *dst++ |= (((0xFF - (*src++ & 0x000000FF)) << 24) & 0xFF000000);
+ if (!imgM.isNull())
+ {
+ for (int ih = 0; ih < img.height(); ih++)
+ {
+ QRgb *src = (QRgb *)imgM.scanLine(ih);
+ QRgb *dst = (QRgb *)img.scanLine(ih);
+ for (int iw = 0; iw < img.width(); iw++)
+ {
+ *dst &= 0x00FFFFFF;
+ *dst++ |= (((0xFF - (*src++ & 0x000000FF)) << 24) & 0xFF000000);
+ }
}
}
ds.device()->seek(posi + totalSize - 16);
More information about the scribus-commit
mailing list