From 6ec769f910459683ac0d8a7345b60a48631462b6 Mon Sep 17 00:00:00 2001 From: Luke Deighton Date: Sun, 24 Jun 2018 20:07:30 +0100 Subject: [PATCH] Prevent null pointer https://github.com/LukeDeighton/WheelView/issues/57 --- .../src/main/java/com/lukedeighton/wheelview/WheelView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WheelViewLib/src/main/java/com/lukedeighton/wheelview/WheelView.java b/WheelViewLib/src/main/java/com/lukedeighton/wheelview/WheelView.java index 8875489..84bb54e 100644 --- a/WheelViewLib/src/main/java/com/lukedeighton/wheelview/WheelView.java +++ b/WheelViewLib/src/main/java/com/lukedeighton/wheelview/WheelView.java @@ -1224,7 +1224,7 @@ private void updateWheelStateIfReq() { protected void onDraw(Canvas canvas) { updateWheelStateIfReq(); - if (mWheelDrawable != null) { + if (mWheelDrawable != null && mWheelBounds != null) { drawWheel(canvas); }