summaryrefslogtreecommitdiffstats
path: root/gui/slider.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/slider.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/slider.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/slider.cpp b/gui/slider.cpp
index ed5c615ce..fab5a2ea0 100644
--- a/gui/slider.cpp
+++ b/gui/slider.cpp
@@ -47,7 +47,6 @@ extern "C" {
GUISlider::GUISlider(xml_node<>* node) : GUIObject(node)
{
- xml_attribute<>* attr;
xml_node<>* child;
sAction = NULL;
@@ -84,8 +83,12 @@ GUISlider::GUISlider(xml_node<>* node) : GUIObject(node)
Placement TextPlacement = CENTER;
LoadPlacement(FindNode(node, "placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH, &TextPlacement);
- mRenderW = sSlider->GetWidth();
- mRenderH = sSlider->GetHeight();
+ if (sSlider && sSlider->GetResource()) {
+ mRenderW = sSlider->GetWidth();
+ mRenderH = sSlider->GetHeight();
+ } else {
+ mRenderW = mRenderH = 0;
+ }
if (TextPlacement == CENTER || TextPlacement == CENTER_X_ONLY) {
mRenderX = mRenderX - (mRenderW / 2);
if (TextPlacement == CENTER) {