Skip to content

Commit

Permalink
avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwei.wang committed Sep 2, 2018
1 parent 3dd4761 commit 3bb345e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public boolean onTouchEvent(MotionEvent event) {
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);

if (relativeElements == null) {
return;
}

boolean doubleNotNull = true;
for (Element element : relativeElements) {
if (element != null) {
Expand Down

0 comments on commit 3bb345e

Please sign in to comment.