Browse Source

Avoided a dangling pointer problem when changing images in DrawableButton

tags/2021-05-28
jules 10 years ago
parent
commit
90b6f62318
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      modules/juce_gui_basics/buttons/juce_DrawableButton.cpp

+ 1
- 0
modules/juce_gui_basics/buttons/juce_DrawableButton.cpp View File

@@ -59,6 +59,7 @@ void DrawableButton::setImages (const Drawable* normal,
overImageOn = copyDrawableIfNotNull (overOn); overImageOn = copyDrawableIfNotNull (overOn);
downImageOn = copyDrawableIfNotNull (downOn); downImageOn = copyDrawableIfNotNull (downOn);
disabledImageOn = copyDrawableIfNotNull (disabledOn); disabledImageOn = copyDrawableIfNotNull (disabledOn);
currentImage = nullptr;
buttonStateChanged(); buttonStateChanged();
} }


Loading…
Cancel
Save