diff --git a/addons/dialogic/Modules/Character/event_character.gd b/addons/dialogic/Modules/Character/event_character.gd index f48ab593c..df7a16521 100644 --- a/addons/dialogic/Modules/Character/event_character.gd +++ b/addons/dialogic/Modules/Character/event_character.gd @@ -89,7 +89,7 @@ var character_identifier: String: set(value): character_identifier = value character = DialogicResourceUtil.get_character_resource(value) - if character and not character.portraits.has(portrait): + if (not character) or (character and not character.portraits.has(portrait)): portrait = "" ui_update_needed.emit() diff --git a/addons/dialogic/Modules/Text/event_text.gd b/addons/dialogic/Modules/Text/event_text.gd index 5eda05795..b547a252f 100644 --- a/addons/dialogic/Modules/Text/event_text.gd +++ b/addons/dialogic/Modules/Text/event_text.gd @@ -32,7 +32,7 @@ var character_identifier: String: set(value): character_identifier = value character = DialogicResourceUtil.get_character_resource(value) - if not character.portraits.has(portrait): + if (not character) or (character and not character.portraits.has(portrait)): portrait = "" ui_update_needed.emit()