Signed-off-by: chenshixu1 <chenshixu1@huawei.com>
This commit is contained in:
chenshixu1 2023-10-30 02:28:19 +00:00
parent bddd8de560
commit 4899ba31b8

View File

@ -768,7 +768,7 @@ long long GetSystemCommitId(void)
{
PARAM_WORKSPACE_CHECK(GetParamWorkSpace(), return -1, "Param workspace has not init.");
WorkSpace *space = GetWorkSpace(WORKSPACE_INDEX_DAC);
if (space == NULL) {
if (space == NULL || space->area == NULL) {
return 0;
}
return ATOMIC_UINT64_LOAD_EXPLICIT(&space->area->commitId, MEMORY_ORDER_ACQUIRE);