update dev300-m58
[ooovba.git] / applied_patches / 0488-emf+-crash-fix.diff
blob99dc77c84a1dceee32cec3f93a7a61dc615b054b
1 diff -rup cppcanvas-orig/source/mtfrenderer/emfplus.cxx cppcanvas/source/mtfrenderer/emfplus.cxx
2 --- cppcanvas-orig/source/mtfrenderer/emfplus.cxx 2008-02-25 12:21:51.000000000 +0100
3 +++ cppcanvas/source/mtfrenderer/emfplus.cxx 2008-02-25 12:42:45.000000000 +0100
4 @@ -783,6 +783,10 @@ namespace cppcanvas
5 EMFPBrush* brush = (EMFPBrush*) aObjects [brushIndexOrColor];
6 EMFP_DEBUG (printf ("EMF+\tbrush fill slot: %d (type: %d)\n", brushIndexOrColor, brush->GetType ()));
8 + // give up in case something wrong happened
9 + if( !brush )
10 + return;
12 rState.isFillColorSet = false;
13 rState.isLineColorSet = false;
15 @@ -992,7 +996,8 @@ namespace cppcanvas
16 aObjects [index] = NULL;
19 - switch (flags & 0xff00) {
20 + // not sure yet, what 0x8000 means
21 + switch (flags & 0x7f00) {
22 case EmfPlusObjectTypeBrush:
24 EMFPBrush *brush;