fix a viewinfostore's crash

This commit is contained in:
侯歌 2024-05-14 15:38:46 +08:00
parent 9b325a35ad
commit f09b947e48

View File

@ -195,10 +195,11 @@ ViewInfoStore::InfoRecord::InfoRecord() {
ViewInfoStore::InfoRecord* ViewInfoStore::InfoRecord::obtain() {
InfoRecord* record = sPool.acquire();
if(record==nullptr)record = new InfoRecord();
record->preInfo = nullptr;
record->postInfo = nullptr;
record->flags = 0;
return record == nullptr ? new InfoRecord() : record;
return record;
}
void ViewInfoStore::InfoRecord::recycle(InfoRecord* record) {