mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #317 from charithag/carbon-kernel-4.4.3
Fix for possible NPE that could happen due to null device or null pro…
This commit is contained in:
commit
76f14c13ab
@ -73,9 +73,11 @@ public class MobileDeviceManagementUtil {
|
||||
}
|
||||
|
||||
private static String getPropertyValue(Device device, String property) {
|
||||
for (Device.Property prop : device.getProperties()) {
|
||||
if (property.equals(prop.getName())) {
|
||||
return prop.getValue();
|
||||
if (device != null && device.getProperties() != null) {
|
||||
for (Device.Property prop : device.getProperties()) {
|
||||
if (property.equals(prop.getName())) {
|
||||
return prop.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user