diff --git a/include/TGUI/Widgets/EditBox.hpp b/include/TGUI/Widgets/EditBox.hpp index 9510fea3..c270cfab 100644 --- a/include/TGUI/Widgets/EditBox.hpp +++ b/include/TGUI/Widgets/EditBox.hpp @@ -560,7 +560,7 @@ namespace tgui FloatRect m_selectedTextBackground; // The blinking caret - FloatRect m_caret; + FloatRect m_caret = {{0, 0, 1, 0}}; // Is there a possibility that the user is going to double click? bool m_possibleDoubleClick = false; diff --git a/include/TGUI/Widgets/TextBox.hpp b/include/TGUI/Widgets/TextBox.hpp index cd0e774f..abc7b438 100644 --- a/include/TGUI/Widgets/TextBox.hpp +++ b/include/TGUI/Widgets/TextBox.hpp @@ -488,7 +488,7 @@ namespace tgui Color m_backgroundColorCached; Color m_caretColorCached; Color m_selectedTextBackgroundColorCached; - float m_caretWidthCached = 0; + float m_caretWidthCached = 1; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// };