1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-10 20:15:54 +00:00

Merge pull request #338 from Zillode/fix-npe-onreceive

Fix NPE when mVersion or mCurrentAddress is not set
This commit is contained in:
Zillode 2015-04-09 20:41:16 +02:00
commit 42be1fb26b

View file

@ -270,6 +270,8 @@ public class DeviceSettingsFragment extends PreferenceFragment implements
*/
@Override
public void onReceiveConnections(Map<String, RestApi.Connection> connections) {
if (mVersion == null || mCurrentAddress == null)
return;
if (connections.containsKey(mDevice.DeviceID)) {
mVersion.setSummary(connections.get(mDevice.DeviceID).ClientVersion);
mCurrentAddress.setSummary(connections.get(mDevice.DeviceID).Address);