diff --git a/src/data/action/value.cpp b/src/data/action/value.cpp index d674505e..5101587f 100644 --- a/src/data/action/value.cpp +++ b/src/data/action/value.cpp @@ -149,7 +149,7 @@ TextValueAction* toggle_format_action(const TextValueP& value, const String& tag new_value += _(""); new_value += str.substr(end_i); } else { - // we are inside this tag, _('remove') it + // we are inside this tag, 'remove' it new_value = str.substr(0, start_i); new_value += _(""); new_value += str.substr(start_i, end_i - start_i); diff --git a/src/gui/value/editor.cpp b/src/gui/value/editor.cpp index d828b932..296fefd5 100644 --- a/src/gui/value/editor.cpp +++ b/src/gui/value/editor.cpp @@ -13,6 +13,8 @@ // ----------------------------------------------------------------------------- : ValueEditor void ValueEditor::addAction(ValueAction* a) { - a->isOnCard(editor().getCard().get()); - editor().addAction(a); + if (a) { + a->isOnCard(editor().getCard().get()); + editor().addAction(a); + } }