summaryrefslogtreecommitdiffstats
path: root/gui/patternpassword.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/patternpassword.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 'gui/patternpassword.cpp')
-rw-r--r--gui/patternpassword.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/patternpassword.cpp b/gui/patternpassword.cpp
index c31737f32..5559f9dd8 100644
--- a/gui/patternpassword.cpp
+++ b/gui/patternpassword.cpp
@@ -40,7 +40,6 @@ extern "C" {
GUIPatternPassword::GUIPatternPassword(xml_node<>* node)
: GUIObject(node)
{
- xml_attribute<>* attr;
xml_node<>* child;
// 3x3 is the default.
@@ -107,7 +106,7 @@ GUIPatternPassword::GUIPatternPassword(xml_node<>* node)
mDotCircle = gr_render_circle(mDotRadius, mDotColor.red, mDotColor.green, mDotColor.blue, mDotColor.alpha);
mActiveDotCircle = gr_render_circle(mDotRadius/2, mActiveDotColor.red, mActiveDotColor.green, mActiveDotColor.blue, mActiveDotColor.alpha);
}
- else
+ else if (mDotImage && mDotImage->GetResource())
mDotRadius = mDotImage->GetWidth()/2;
SetRenderPos(mRenderX, mRenderY, mRenderW, mRenderH);
@@ -210,10 +209,10 @@ int GUIPatternPassword::Render(void)
gr_blit(mActiveDotCircle, 0, 0, gr_get_width(mActiveDotCircle), gr_get_height(mActiveDotCircle), mDots[i].x + mDotRadius/2, mDots[i].y + mDotRadius/2);
}
} else {
- if (mDots[i].active) {
+ if (mDots[i].active && mActiveDotImage && mActiveDotImage->GetResource()) {
gr_blit(mActiveDotImage->GetResource(), 0, 0, mActiveDotImage->GetWidth(), mActiveDotImage->GetHeight(),
mDots[i].x + (mDotRadius - mActiveDotImage->GetWidth()/2), mDots[i].y + (mDotRadius - mActiveDotImage->GetHeight()/2));
- } else {
+ } else if (mDotImage && mDotImage->GetResource()) {
gr_blit(mDotImage->GetResource(), 0, 0, mDotImage->GetWidth(), mDotImage->GetHeight(), mDots[i].x, mDots[i].y);
}
}