DrawableButton::setImages leaves a dangling pointer


#1

Calling DrawableButton::setImages will leave a dangling pointer (currentImage) when called a second time to replace the contents of a button. This leads to a crash in DrawableButton::buttonStateChanged later.

I guess currentImage has to be set to nullptr before calling buttonStateChanged?

 

Cheers

 


#2

Ah, good call, thanks! Will check that..