summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/emf-inout.cpp
diff options
context:
space:
mode:
authorDavid Mathog <>2012-10-04 23:44:26 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-10-04 23:44:26 +0000
commit2016ceee470cdebba2aa48f963369e53602f3211 (patch)
treee849e1da9c51fa8146769f05e5555cc6dd0f7c96 /src/extension/internal/emf-inout.cpp
parentmerge from trunk (r11737) (diff)
downloadinkscape-2016ceee470cdebba2aa48f963369e53602f3211.tar.gz
inkscape-2016ceee470cdebba2aa48f963369e53602f3211.zip
changes_2012_10_04b.patch: fixes one small memory issue (bytes allocated and never deallocated, not a leak per se)
(bzr r11668.1.24)
Diffstat (limited to 'src/extension/internal/emf-inout.cpp')
-rw-r--r--src/extension/internal/emf-inout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp
index 2f682d5da..550f05cf3 100644
--- a/src/extension/internal/emf-inout.cpp
+++ b/src/extension/internal/emf-inout.cpp
@@ -1383,7 +1383,8 @@ int myEnhMetaFileProc(char *contents, unsigned int length, PEMF_CALLBACK_DATA d)
SVGOStringStream tmp_str;
SVGOStringStream dbg_str;
- emr_mask = emr_properties(lpEMFR->iType);
+ emr_mask = emr_properties(lpEMFR->iType);
+ if(emr_mask == U_EMR_INVALID){ throw "Inkscape fatal memory allocation error - cannot continue"; }
// std::cout << "BEFORE DRAW logic d->mask: " << std::hex << d->mask << " emr_mask: " << emr_mask << std::dec << std::endl;
/*
@@ -2980,6 +2981,7 @@ std::cout << "BEFORE DRAW"
} //end of while
// When testing, uncomment the following to show the final SVG derived from the EMF
// std::cout << *(d->outsvg) << std::endl;
+ (void) emr_properties(U_EMR_INVALID); // force the release of the lookup table memory, returned value is irrelevant
return 1;
}