emf+-crash-fix.diff: emf+ import - fix crash

n#361534
This commit is contained in:
Radek Doulik
2010-09-15 11:19:07 +02:00
parent 33bf550d54
commit acd8f4caef

View File

@@ -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;