Merge AOSP android-9.0.0_r3
Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0
Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
diff --git a/gui/slider.cpp b/gui/slider.cpp
index ed5c615..fab5a2e 100644
--- a/gui/slider.cpp
+++ b/gui/slider.cpp
@@ -47,7 +47,6 @@
GUISlider::GUISlider(xml_node<>* node) : GUIObject(node)
{
- xml_attribute<>* attr;
xml_node<>* child;
sAction = NULL;
@@ -84,8 +83,12 @@
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) {