diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 9f19cfbb57..38497bb1a7 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -38,7 +38,13 @@ using namespace KIGFX; GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) : m_options( aDisplayOptions ), - m_strokeFont( this ) + m_strokeFont( this ), + // m_currentNativeCursor is initialized with KICURSOR::DEFAULT value to avoid + // if comparison with uninitialized value on SetNativeCursorStyle method. + // Some classes inheriting from GAL has different SetNativeCursorStyle method + // implementation and therefore it's called also on constructor + // to change the value from DEFAULT to KICURSOR::ARROW + m_currentNativeCursor( KICURSOR::DEFAULT ) { // Set the default values for the internal variables SetIsFill( false );