summaryrefslogtreecommitdiffstats
path: root/gui/button.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:39 +0200
commit58f2132bc3954fc704787d477500a209eedb8e29 (patch)
treeeb0f79aacd68724b0c0c091018384ef924380f47 /gui/button.cpp
parentRemove remaining pieces of supersu (diff)
parentSnap for 4745538 from 723056a83f8c8b15af02d9c302862dbb2304ea8c to pi-release (diff)
downloadandroid_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.gz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.bz2
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.lz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.xz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.zst
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.zip
Diffstat (limited to '')
-rw-r--r--gui/button.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gui/button.cpp b/gui/button.cpp
index a9b02a305..dfae5e237 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -45,9 +45,6 @@ extern "C" {
GUIButton::GUIButton(xml_node<>* node)
: GUIObject(node)
{
- xml_attribute<>* attr;
- xml_node<>* child;
-
mButtonImg = NULL;
mButtonIcon = NULL;
mButtonLabel = NULL;
@@ -201,9 +198,12 @@ int GUIButton::SetRenderPos(int x, int y, int w, int h)
mRenderW = w;
mRenderH = h;
}
+ mIconW = mIconH = 0;
- mIconW = mButtonIcon->GetWidth();
- mIconH = mButtonIcon->GetHeight();
+ if (mButtonIcon && mButtonIcon->GetResource()) {
+ mIconW = mButtonIcon->GetWidth();
+ mIconH = mButtonIcon->GetHeight();
+ }
mTextH = 0;
mTextW = 0;