summaryrefslogtreecommitdiffstats
path: root/scene/resources/font.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-28 14:56:06 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-01-28 15:10:34 +0100
commit402cfa983d1773b72cc69c63a9e3bccff285d0a4 (patch)
tree1ff8fb45819a19813951fa4613c0728059fa1708 /scene/resources/font.cpp
parent70689ebffd95ab34e45bcbfdce3f6389033bfd44 (diff)
downloadredot-engine-402cfa983d1773b72cc69c63a9e3bccff285d0a4.tar.gz
Fix recursive assignment of Textures and BitMapFont
Fixes #24213.
Diffstat (limited to 'scene/resources/font.cpp')
-rw-r--r--scene/resources/font.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 7ecf9a2b16..c72ccc97db 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -497,6 +497,7 @@ Size2 Font::get_string_size(const String &p_string) const {
}
void BitmapFont::set_fallback(const Ref<BitmapFont> &p_fallback) {
+ ERR_FAIL_COND(p_fallback == this);
fallback = p_fallback;
}