From 16016d955feec1482da23291ea0f21de1ad6459e Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 1 Nov 2013 09:31:26 -0700 Subject: Add null check in SmartDialCursorLoader.releaseResources Bug: 11474252 Change-Id: Id5a64aa72790bddef9e8fd2d4661635bd2eb6f44 --- src/com/android/dialer/dialpad/SmartDialCursorLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/dialer/dialpad/SmartDialCursorLoader.java b/src/com/android/dialer/dialpad/SmartDialCursorLoader.java index a13ecd8da..369079618 100644 --- a/src/com/android/dialer/dialpad/SmartDialCursorLoader.java +++ b/src/com/android/dialer/dialpad/SmartDialCursorLoader.java @@ -162,6 +162,8 @@ public class SmartDialCursorLoader extends AsyncTaskLoader { } private void releaseResources(Cursor cursor) { - cursor.close(); + if (cursor != null) { + cursor.close(); + } } } -- cgit v1.2.3