Commit 0b6b72ae4415afd79aaad53473bd5ce67c3bd788
1 parent
a012007f
多级虚拟组织处理修复
Showing
1 changed file
with
1 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
| ... | ... | @@ -212,7 +212,7 @@ public class XmlUtil { |
| 212 | 212 | } |
| 213 | 213 | deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID")); |
| 214 | 214 | String parentId = XmlUtil.getText(itemDevice, "ParentID"); |
| 215 | - if (parentId.contains("/")) { | |
| 215 | + if (parentId != null && parentId.contains("/")) { | |
| 216 | 216 | String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1); |
| 217 | 217 | deviceChannel.setParentId(lastParentId); |
| 218 | 218 | }else { | ... | ... |