fix(stream): add null ptr check.

This commit is contained in:
Haojun Liao 2024-01-05 18:13:35 +08:00
parent 0c4b91dc72
commit 33253cbb54
1 changed files with 5 additions and 1 deletions

View File

@ -689,8 +689,12 @@ bool streamTaskIsIdle(const SStreamTask* pTask) {
bool streamTaskReadyToRun(const SStreamTask* pTask, char** pStatus) {
SStreamTaskState* pState = streamTaskGetStatus(pTask);
ETaskStatus st = pState->state;
if (pStatus != NULL) {
*pStatus = pState->name;
}
return (st == TASK_STATUS__READY || st == TASK_STATUS__SCAN_HISTORY || st == TASK_STATUS__CK);
}