1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +00:00

Fix NPE when mVersion or mCurrentAddress is not set

This commit is contained in:
Lode Hoste 2015-04-06 13:05:31 +02:00
parent 832c7fdf72
commit 18901b03b8

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);