Code

fix crash described at
authorJucaBlues <JucaBlues@users.sourceforge.net>
Thu, 29 Jan 2009 21:09:39 +0000 (21:09 +0000)
committerJucaBlues <JucaBlues@users.sourceforge.net>
Thu, 29 Jan 2009 21:09:39 +0000 (21:09 +0000)
https://bugs.launchpad.net/inkscape/+bug/307567

src/ui/dialog/document-properties.cpp

index 76a50c9c7f13ffbd4a274f0db6e5ad610fb76040..d472715c4fcba78c4df89d4aa0c10db120ae4141 100644 (file)
@@ -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"));