summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-07-22 10:02:36 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-07-22 10:02:36 +0000
commit9c0b8ae87db4fc8f471924a14b9420709a607b7d (patch)
treef5ab4b730b98981c34b40b2333eb6966cadbee0e /src/sp-guide.cpp
parentPatch from Andreas Becker to fix bug 805238 (Crash when setting empty font fa... (diff)
downloadinkscape-9c0b8ae87db4fc8f471924a14b9420709a607b7d.tar.gz
inkscape-9c0b8ae87db4fc8f471924a14b9420709a607b7d.zip
fix crash when guideline is deleted by dragging it off-canvas
(bzr r10488)
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index 8d9d7b87d..033e1db1f 100644
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
@@ -476,6 +476,10 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose)
using Geom::Y;
SPNamedView *namedview = sp_document_namedview(guide->document, NULL);
+ if (!namedview) {
+ // Guide has probably been deleted and no longer has an attached namedview.
+ return g_strdup_printf(_("Deleted"));
+ }
GString *position_string_x = SP_PX_TO_METRIC_STRING(guide->point_on_line[X],
namedview->getDefaultMetric());
GString *position_string_y = SP_PX_TO_METRIC_STRING(guide->point_on_line[Y],