diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-10 00:05:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-10 00:05:01 +0100 |
commit | f2cd52ddd7f57bb2f8065eecd27fde86ba550648 (patch) | |
tree | c3d7bcc628ea8960c3443bbd7db0dd097149eaf7 /scene/gui/button.cpp | |
parent | 3aeb43f14c4c25cddd438ff05c909d993177a277 (diff) | |
parent | 0fc0f0fc983b4760960d4d121cbad66ab428b4c0 (diff) |
Merge pull request #33500 from nekomatata/button-icon-override-crash-2
Fixed crash when using icon override in button
Diffstat (limited to 'scene/gui/button.cpp')
-rw-r--r-- | scene/gui/button.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 23f2caa9fb..ca4c255855 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -179,7 +179,7 @@ void Button::_notification(int p_what) { if (icon_width > _size.width) { icon_width = _size.width; - icon_height = icon->get_height() * icon_width / _icon->get_width(); + icon_height = _icon->get_height() * icon_width / _icon->get_width(); } icon_region = Rect2(style->get_offset() + Point2(icon_ofs_region, (_size.height - icon_height) / 2), Size2(icon_width, icon_height)); |