diff options
Diffstat (limited to 'src/ui/dialog/objects.cpp')
| -rw-r--r-- | src/ui/dialog/objects.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index 9e115a2d6..f02df8042 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -422,13 +422,16 @@ void ObjectsPanel::_updateObject( SPObject *obj, bool recurse ) { bool ObjectsPanel::_checkForUpdated(const Gtk::TreeIter& iter, SPObject* obj) { Gtk::TreeModel::Row row = *iter; - if ( obj == row[_model->_colObject] ) + if (obj && *iter && obj == row[_model->_colObject] ) { //We found our item in the tree!! Update it! SPItem * item = SP_IS_ITEM(obj) ? SP_ITEM(obj) : nullptr; SPGroup * group = SP_IS_GROUP(obj) ? SP_GROUP(obj) : nullptr; - - row[_model->_colLabel] = obj->label() ? obj->label() : obj->getId(); + gchar const * id = obj->getId(); + if (!id) { + id = _("no-id"); + } + row[_model->_colLabel] = obj->label() ? obj->label() : id; row[_model->_colVisible] = item ? !item->isHidden() : false; row[_model->_colLocked] = item ? !item->isSensitive() : false; row[_model->_colType] = group ? (group->layerMode() == SPGroup::LAYER ? 2 : 1) : 0; |
