mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 05:57:00 -04:00
don't crash when an action=nullptr (partial fix for #20)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1455 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -149,7 +149,7 @@ TextValueAction* toggle_format_action(const TextValueP& value, const String& tag
|
|||||||
new_value += _("</") + tag + _(">");
|
new_value += _("</") + tag + _(">");
|
||||||
new_value += str.substr(end_i);
|
new_value += str.substr(end_i);
|
||||||
} else {
|
} else {
|
||||||
// we are inside this tag, _('remove') it
|
// we are inside this tag, 'remove' it
|
||||||
new_value = str.substr(0, start_i);
|
new_value = str.substr(0, start_i);
|
||||||
new_value += _("</") + tag + _(">");
|
new_value += _("</") + tag + _(">");
|
||||||
new_value += str.substr(start_i, end_i - start_i);
|
new_value += str.substr(start_i, end_i - start_i);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
// ----------------------------------------------------------------------------- : ValueEditor
|
// ----------------------------------------------------------------------------- : ValueEditor
|
||||||
|
|
||||||
void ValueEditor::addAction(ValueAction* a) {
|
void ValueEditor::addAction(ValueAction* a) {
|
||||||
a->isOnCard(editor().getCard().get());
|
if (a) {
|
||||||
editor().addAction(a);
|
a->isOnCard(editor().getCard().get());
|
||||||
|
editor().addAction(a);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user