fixed rare npe in loading of selfi
This commit is contained in:
parent
1521b91b27
commit
fe46d36137
|
@ -74,7 +74,7 @@ public class PhoneHelper {
|
||||||
Cursor mProfileCursor = context.getContentResolver().query(
|
Cursor mProfileCursor = context.getContentResolver().query(
|
||||||
Profile.CONTENT_URI, mProjection, null, null, null);
|
Profile.CONTENT_URI, mProjection, null, null, null);
|
||||||
|
|
||||||
if (mProfileCursor.getCount() == 0) {
|
if (mProfileCursor == null || mProfileCursor.getCount() == 0) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
mProfileCursor.moveToFirst();
|
mProfileCursor.moveToFirst();
|
||||||
|
|
Loading…
Reference in a new issue