From 8ab627048e551b3ba76e67f623db3c94ba63dfcd Mon Sep 17 00:00:00 2001 From: zdi Date: Wed, 3 Feb 2016 12:37:25 +0800 Subject: Gallery2: Fix null pointer exception when select "Color". Add null value check to avoid null pointer exception. Change-Id: I0a284a156abe4947fe70b7a3592278a8052768a6 CRs-Fixed: 970766 --- src/com/android/gallery3d/filtershow/editors/EditorColorBorder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/gallery3d/filtershow/editors/EditorColorBorder.java b/src/com/android/gallery3d/filtershow/editors/EditorColorBorder.java index 98659df38..ec44d7ed8 100644 --- a/src/com/android/gallery3d/filtershow/editors/EditorColorBorder.java +++ b/src/com/android/gallery3d/filtershow/editors/EditorColorBorder.java @@ -176,7 +176,9 @@ public class EditorColorBorder extends ParametricEditor { c.setColorSet(mBasColors); } updateText(); - mControl.updateUI(); + if (mControl != null) { + mControl.updateUI(); + } mView.invalidate(); } -- cgit v1.2.3