DBHelper: no not update device attributes in db if we call getDevice() on a disconnected device

Fixes NPE
master
Andreas Shimokawa 2017-04-16 19:43:53 +02:00
parent 16af0724dd
commit 67f035accf
1 changed files with 3 additions and 1 deletions

View File

@ -384,7 +384,9 @@ public class DBHelper {
} else {
ensureDeviceUpToDate(device, gbDevice, session);
}
ensureDeviceAttributes(device, gbDevice, session);
if (gbDevice.isInitialized()) {
ensureDeviceAttributes(device, gbDevice, session);
}
return device;
}