summaryrefslogtreecommitdiff
path: root/scene/resources/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/font.cpp')
-rw-r--r--scene/resources/font.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index b78b3a6ffb..c72ccc97db 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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;
}