DBHelper: no not update device attributes in db if we call getDevice() on a disconnected device
Fixes NPE
This commit is contained in:
parent
16af0724dd
commit
67f035accf
|
@ -384,7 +384,9 @@ public class DBHelper {
|
||||||
} else {
|
} else {
|
||||||
ensureDeviceUpToDate(device, gbDevice, session);
|
ensureDeviceUpToDate(device, gbDevice, session);
|
||||||
}
|
}
|
||||||
|
if (gbDevice.isInitialized()) {
|
||||||
ensureDeviceAttributes(device, gbDevice, session);
|
ensureDeviceAttributes(device, gbDevice, session);
|
||||||
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue