From ce72fe414301898c200ec15b66fd39beff60add3 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 26 May 2021 14:51:45 +0100 Subject: [PATCH] Label: Check for deletion before calling repaint() in hideEditor() --- modules/juce_gui_basics/widgets/juce_Label.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index 1ade565757..9a5a6a0932 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -282,7 +282,9 @@ void Label::hideEditor (bool discardCurrentEditorContents) const bool changed = (! discardCurrentEditorContents) && updateFromTextEditorContents (*outgoingEditor); outgoingEditor.reset(); - repaint(); + + if (deletionChecker != nullptr) + repaint(); if (changed) textWasEdited();