summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2010-09-15 11:19:07 +0200
committerRadek Doulik <rodo@novell.com>2010-09-15 17:54:14 +0200
commitacd8f4caef83c5daf8bea61ace7e5024d192b413 (patch)
tree5490967a988d92d80d300aee8b1adb96969dbfd9 /cppcanvas
parent33bf550d54f0a9f98edd2e7aec1ece5ba11a1def (diff)
emf+-crash-fix.diff: emf+ import - fix crash
n#361534
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 46f643f2345a..699c2d4cb8d2 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -810,6 +810,10 @@ namespace cppcanvas
EMFPBrush* brush = (EMFPBrush*) aObjects [brushIndexOrColor];
EMFP_DEBUG (printf ("EMF+\tbrush fill slot: %d (type: %d)\n", brushIndexOrColor, brush->GetType ()));
+ // give up in case something wrong happened
+ if( !brush )
+ return;
+
rState.isFillColorSet = false;
rState.isLineColorSet = false;
@@ -1019,7 +1023,8 @@ namespace cppcanvas
aObjects [index] = NULL;
}
- switch (flags & 0xff00) {
+ // not sure yet, what 0x8000 means
+ switch (flags & 0x7f00) {
case EmfPlusObjectTypeBrush:
{
EMFPBrush *brush;