summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-11-29 06:01:51 +0100
committerDees Troy <dees_troy@teamw.in>2013-11-29 06:02:40 +0100
commit4168a07310f8e48f6dc9646588d0cf3e1c6bcc90 (patch)
tree952c3e48dadb6fdf46f26af0cb94b7afeea097db /gui
parentAdd check during boot for SELinux support (diff)
downloadandroid_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar.gz
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar.bz2
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar.lz
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar.xz
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.tar.zst
android_bootable_recovery-4168a07310f8e48f6dc9646588d0cf3e1c6bcc90.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/button.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/gui/button.cpp b/gui/button.cpp
index 3f9c2df1f..be52c277e 100644
--- a/gui/button.cpp
+++ b/gui/button.cpp
@@ -58,15 +58,19 @@ GUIButton::GUIButton(xml_node<>* node)
if (!node) return;
- // Three of the four can be loaded directly from the node
- mButtonImg = new GUIImage(node);
+ // These can be loaded directly from the node
mButtonLabel = new GUIText(node);
mAction = new GUIAction(node);
- if (mButtonImg->Render() < 0)
+ child = node->first_node("image");
+ if (child)
{
- delete mButtonImg;
- mButtonImg = NULL;
+ mButtonImg = new GUIImage(node);
+ if (mButtonImg->Render() < 0)
+ {
+ delete mButtonImg;
+ mButtonImg = NULL;
+ }
}
if (mButtonLabel->Render() < 0)
{