Fix potential NULL dereference

This commit is contained in:
Johan Mattsson 2023-02-19 11:21:39 +01:00 committed by arcady-lunarg
parent 6d41bb9c55
commit c64c98267c

View File

@ -1542,11 +1542,10 @@ int ShLinkExt(
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle); TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle);
TLinker* linker = static_cast<TLinker*>(base->getAsLinker()); TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
SetThreadPoolAllocator(linker->getPool());
if (linker == nullptr) if (linker == nullptr)
return 0; return 0;
SetThreadPoolAllocator(linker->getPool());
linker->infoSink.info.erase(); linker->infoSink.info.erase();
for (int i = 0; i < numHandles; ++i) { for (int i = 0; i < numHandles; ++i) {