From fe46d361374054ed0cd4ecc29482491ecf2bb1fc 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();