Commit 85f20df9dea0edf912e7608b0409386c100e760b
1 parent
47526e24
修复空指针异常
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java
| ... | ... | @@ -162,8 +162,8 @@ public class CloudRecordServiceImpl implements ICloudRecordService { |
| 162 | 162 | throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到可用的流媒体"); |
| 163 | 163 | } |
| 164 | 164 | JSONObject result = assistRESTfulUtils.queryTaskList(mediaServerItem, app, stream, callId, taskId, isEnd); |
| 165 | - if (result.getInteger("code") != 0) { | |
| 166 | - throw new ControllerException(result.getInteger("code"), result.getString("msg")); | |
| 165 | + if (result == null || result.getInteger("code") != 0) { | |
| 166 | + throw new ControllerException(ErrorCode.ERROR100.getCode(), result.getString("msg")); | |
| 167 | 167 | } |
| 168 | 168 | return result.getJSONArray("data"); |
| 169 | 169 | } | ... | ... |