nrikiji / cordova-line-login-plugin

A cordova plugin for easy implementation of LINE login using LineSDK.
Apache License 2.0
21 stars 23 forks source link

Android app crash for no avatar user login #53

Closed SheldonYS closed 4 years ago

SheldonYS commented 4 years ago

When I tested with new register user which avatar is not set, the Android app crash. Because the profile.getPictureUrl() at https://github.com/nrikiji/cordova-line-login-plugin/blob/master/src/android/LineLogin.java#L78 is null. I am wondering if you have the same situation for no avatar account.

So I suggest change this line to the following code:

...
if (profile.getPictureUrl() != null) {
    json.put("pictureURL", profile.getPictureUrl().toString());
}
...

Thanks for your consideration!

nrikiji commented 4 years ago

Thank you for the report. Corrected.