diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-17 04:48:43 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-17 04:48:43 +0000 |
| commit | c99f5b02fce8b98463d7868c61bc77f8bf675665 (patch) | |
| tree | 9bd139839f3451596dd0f4ad3fe85c21a889cea3 /src/sp-namedview.cpp | |
| parent | Added copyright header and name to AUTHORS. (diff) | |
| download | inkscape-c99f5b02fce8b98463d7868c61bc77f8bf675665.tar.gz inkscape-c99f5b02fce8b98463d7868c61bc77f8bf675665.zip | |
Fixed memory corruption introduced in a previous commit.
(bzr r12380.1.14)
Diffstat (limited to 'src/sp-namedview.cpp')
| -rw-r--r-- | src/sp-namedview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index c7301f9bd..0833d93bf 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -552,11 +552,11 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va * doc_units. */ static Inkscape::Util::Unit px = unit_table.getUnit("px"); - Inkscape::Util::Unit const *new_unit = &px; + Inkscape::Util::Unit const *new_unit = new Inkscape::Util::Unit(px); if (value) { Inkscape::Util::Unit u = unit_table.getUnit(value); - Inkscape::Util::Unit const *const req_unit = &u; + Inkscape::Util::Unit const *const req_unit = new Inkscape::Util::Unit(u); if ( !unit_table.hasUnit(value) ) { g_warning("Unrecognized unit `%s'", value); /* fixme: Document errors should be reported in the status bar or @@ -580,7 +580,7 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va if (value) { Inkscape::Util::Unit u = unit_table.getUnit(value); - Inkscape::Util::Unit const *const req_unit = &u; + Inkscape::Util::Unit const *const req_unit = new Inkscape::Util::Unit(u); if ( !unit_table.hasUnit(value) ) { g_warning("Unrecognized unit `%s'", value); /* fixme: Document errors should be reported in the status bar or |
