Code

fix crit bug #168570 Crash when recreating grid using 'redo'
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 23 Dec 2007 21:52:57 +0000 (21:52 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 23 Dec 2007 21:52:57 +0000 (21:52 +0000)
src/ui/dialog/document-properties.cpp

index 70e6a9ecc43aafc728da0d74066236207f50c036..5ffe3dcb89bccf3b3d72e5254caac96cc932c41f 100644 (file)
@@ -406,6 +406,7 @@ DocumentProperties::update_gridspage()
     bool grids_present = false;
     for (GSList const * l = nv->grids; l != NULL; l = l->next) {
         Inkscape::CanvasGrid * grid = (Inkscape::CanvasGrid*) l->data;
+        if (!grid->repr->attribute("id")) continue; // update_gridspage is called again when "id" is added
         _grids_notebook.append_page(grid->getWidget(), grid->repr->attribute("id"));
         grids_present = true;
     }