Merge pull request #63407 from RedMser/install-effect-error

Add error for invalid RichTextLabel.install_effect
This commit is contained in:
Rémi Verschelde 2022-07-24 23:48:43 +02:00 committed by GitHub
commit 96401b48ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4883,11 +4883,10 @@ void RichTextLabel::install_effect(const Variant effect) {
Ref<RichTextEffect> rteffect;
rteffect = effect;
if (rteffect.is_valid()) {
custom_effects.push_back(effect);
if ((!text.is_empty()) && use_bbcode) {
parse_bbcode(text);
}
ERR_FAIL_COND_MSG(rteffect.is_null(), "Invalid RichTextEffect resource.");
custom_effects.push_back(effect);
if ((!text.is_empty()) && use_bbcode) {
parse_bbcode(text);
}
}