From 2793d72c49812a6a7401177fa0b66f92f1912579 Mon Sep 17 00:00:00 2001 From: JucaBlues Date: Thu, 29 Jan 2009 21:09:39 +0000 Subject: [PATCH] fix crash described at https://bugs.launchpad.net/inkscape/+bug/307567 --- src/ui/dialog/document-properties.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 76a50c9c7..d472715c4 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -391,6 +391,10 @@ DocumentProperties::linkSelectedProfile() if (!desktop){ g_warning("No active desktop"); } else { + if (!_menu.get_active()){ + g_warning("No color profile available."); + return; + } Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); Inkscape::XML::Node *cprofRepr = xml_doc->createElement("svg:color-profile"); cprofRepr->setAttribute("name", (gchar*) _menu.get_active()->get_data("name")); -- 2.30.2