From 8a5f9f148893f19d41f2382fa17166791a7cd868 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 30 Jul 2014 21:24:42 +0200 Subject: [PATCH] fixed rare npe in loading of selfi --- src/eu/siacs/conversations/utils/PhoneHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/utils/PhoneHelper.java b/src/eu/siacs/conversations/utils/PhoneHelper.java index bccd7210e..67623ea3a 100644 --- a/src/eu/siacs/conversations/utils/PhoneHelper.java +++ b/src/eu/siacs/conversations/utils/PhoneHelper.java @@ -74,7 +74,7 @@ public class PhoneHelper { Cursor mProfileCursor = context.getContentResolver().query( Profile.CONTENT_URI, mProjection, null, null, null); - if (mProfileCursor.getCount() == 0) { + if (mProfileCursor == null || mProfileCursor.getCount() == 0) { return null; } else { mProfileCursor.moveToFirst();