summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/dynamic_font.cpp6
-rw-r--r--scene/resources/room.cpp2
-rw-r--r--scene/resources/room.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 78a5571bf0..1edae01754 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -573,7 +573,11 @@ DynamicFontAtSize::~DynamicFontAtSize(){
void DynamicFont::set_font_data(const Ref<DynamicFontData>& p_data) {
data=p_data;
- data_at_size=data->_get_dynamic_font_at_size(size);
+ if (data.is_valid())
+ data_at_size=data->_get_dynamic_font_at_size(size);
+ else
+ data_at_size=Ref<DynamicFontAtSize>();
+
emit_changed();
}
diff --git a/scene/resources/room.cpp b/scene/resources/room.cpp
index 4024e2f45c..d1fc614c90 100644
--- a/scene/resources/room.cpp
+++ b/scene/resources/room.cpp
@@ -31,7 +31,7 @@
#include "servers/visual_server.h"
-RID RoomBounds::get_rid() {
+RID RoomBounds::get_rid() const {
return area;
}
diff --git a/scene/resources/room.h b/scene/resources/room.h
index a9f159cd46..3ed41a3e61 100644
--- a/scene/resources/room.h
+++ b/scene/resources/room.h
@@ -50,7 +50,7 @@ protected:
public:
- virtual RID get_rid();
+ virtual RID get_rid() const;
void set_bounds( const BSP_Tree& p_bounds );
BSP_Tree get_bounds() const;