From 8c3d235690a79d4fde1e67dfd15eba22749edaa5 Mon Sep 17 00:00:00 2001 From: Felipe Corr??a da Silva Sanches Date: Thu, 29 Jan 2009 21:09:39 +0000 Subject: fix crash described at https://bugs.launchpad.net/inkscape/+bug/307567 (bzr r7206) --- src/ui/dialog/document-properties.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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")); -- cgit v1.2.3