[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/calligra/2.9] krita/plugins/formats/odg: CCBUG:345312 Don't crash when opening an odg crea
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2015-10-30 6:51:33
Message-ID: E1Zs3XB-0002Op-07 () scm ! kde ! org
[Download RAW message or body]
Git commit ca15d3d83511a1cbaba9b6ae714dd797953fa54a by Boudewijn Rempt.
Committed on 30/10/2015 at 06:37.
Pushed by rempt into branch 'calligra/2.9'.
CCBUG:345312 Don't crash when opening an odg created in inkscape
However, the result is empty.
M +6 -4 krita/plugins/formats/odg/kis_odg_import.cc
http://commits.kde.org/calligra/ca15d3d83511a1cbaba9b6ae714dd797953fa54a
diff --git a/krita/plugins/formats/odg/kis_odg_import.cc b/krita/plugins/formats/odg/kis_odg_import.cc
index ca87baf..5cb364d 100644
--- a/krita/plugins/formats/odg/kis_odg_import.cc
+++ b/krita/plugins/formats/odg/kis_odg_import.cc
@@ -119,10 +119,12 @@ KisImportExportFilter::ConversionStatus KisODGImport::convert(const QByteArray&
if (master) {
const KoXmlElement *style = odfStore.styles().findStyle(
master->attributeNS(KoXmlNS::style, "page-layout-name", QString()));
- KoPageLayout pageLayout;
- pageLayout.loadOdf(*style);
- width = pageLayout.width;
- height = pageLayout.height;
+ if (style) {
+ KoPageLayout pageLayout;
+ pageLayout.loadOdf(*style);
+ width = pageLayout.width;
+ height = pageLayout.height;
+ }
}
// We work fine without a master page
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic