tdf#137713 GetEditView must be called unconditionally in Paint
Change-Id: I9593b263c71ff2a169754ff272198965f4e0e277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104758
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 5d90128..799a66e 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1219,11 +1219,15 @@ void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangl
Color aBgColor = rStyleSettings.GetWindowColor();
rRenderContext.SetBackground(aBgColor);
if (mbInvalidate)
// tdf#137713 we rely on GetEditView creating it if it doesn't already exist so
// GetEditView() must be called unconditionally
if (EditView* pView = GetEditView())
{
if (EditView* pView = GetEditView())
if (mbInvalidate)
{
pView->Invalidate();
mbInvalidate = false;
mbInvalidate = false;
}
}
WeldEditView::Paint(rRenderContext, rRect);