diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-09-07 11:59:51 +0300 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-09-07 11:59:51 +0300 |
| commit | 1ced1f9c9981c923a4c6bf8d461028f8ffa622f6 (patch) | |
| tree | 2d463fd98799d004e85f5832c3deee0c302143a2 /modules/text_server_fb | |
| parent | 8449592d92eaeef990f5502b419d491ee3eeb7a6 (diff) | |
| download | redot-engine-1ced1f9c9981c923a4c6bf8d461028f8ffa622f6.tar.gz | |
[TextServer] Pass Dictionary properties by value and check property values instead of references..
Diffstat (limited to 'modules/text_server_fb')
| -rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 5d4de7a0d6..26d16a1ec9 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -1376,8 +1376,10 @@ void TextServerFallback::_font_set_variation_coordinates(const RID &p_font_rid, ERR_FAIL_COND(!fd); MutexLock lock(fd->mutex); - _font_clear_cache(fd); - fd->variation_coordinates = p_variation_coordinates; + if (!fd->variation_coordinates.recursive_equal(p_variation_coordinates, 1)) { + _font_clear_cache(fd); + fd->variation_coordinates = p_variation_coordinates.duplicate(); + } } Dictionary TextServerFallback::_font_get_variation_coordinates(const RID &p_font_rid) const { |
