CodeEditorComponent lookAndFeelChanged caret handling

Hi, I noticed a fix for the caret reset handling in commit bcb85bc752f6fce28c50abe22cfa5baf853eee74. Should it be checking the read only state before assuming addAndMakeVisible is correct action? And although unlikely to happen, should it not have some kind of handling for a badly behaving createCaretComponent impl returning null?

void CodeEditorComponent::lookAndFeelChanged()
    caret.reset (getLookAndFeel().createCaretComponent (this));
    addAndMakeVisible (*caret);

Yep we’ll get that sorted out, thanks!

1 Like