inaturalist / iNaturalistAndroid

Android app for iNaturalist.org
https://market.android.com/details?id=org.inaturalist.android
MIT License
165 stars 57 forks source link

NullPointerException in BaseFragmentActivity$UserDetailsReceiver #1241

Open kueda opened 1 year ago

kueda commented 1 year ago
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)' on a null object reference
 at org.inaturalist.android.BaseFragmentActivity$UserDetailsReceiver.onReceive(BaseFragmentActivity.java:888)
 at androidx.localbroadcastmanager.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313)
 at androidx.localbroadcastmanager.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121)
 at android.os.Handler.dispatchMessage(Handler.java:106)
 at android.os.Looper.loopOnce(Looper.java:201)
 at android.os.Looper.loop(Looper.java:288)

I hit this when testing a really old user I made that didn't have a locale, so maybe that's not possible for new users, but I'd still like to guard against it.