From 0b298633e153c543eae33eb7dadfdedb6098d33d Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 21 Mar 2019 08:28:28 +0100 Subject: fix #145 XML editor crash removing style property --- src/ui/dialog/cssdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/dialog/cssdialog.cpp b/src/ui/dialog/cssdialog.cpp index ea1b0d044..90488e203 100644 --- a/src/ui/dialog/cssdialog.cpp +++ b/src/ui/dialog/cssdialog.cpp @@ -312,7 +312,7 @@ bool CssDialog::setStyleProperty(Glib::ustring name, Glib::ustring value) std::map properties = parseStyle(original); bool updated = false; - if (value != nullptr && !value.empty()) { + if (!value.empty()) { if (properties[name] != value) { // Set value (create or update) properties[name] = value; @@ -341,7 +341,7 @@ void CssDialog::onPropertyDelete(Glib::ustring path) { Gtk::TreeModel::Row row = *_store->get_iter(path); if (row) { - this->setStyleProperty(row[_cssColumns.label], nullptr); + this->setStyleProperty(row[_cssColumns.label], ""); } } -- cgit v1.2.3