mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
filesystem: fix possible NULL dereference
This commit is contained in:
parent
fed65dd497
commit
f995d055b5
@ -320,6 +320,12 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
state = new CSearchState( &searchHead, search );
|
state = new CSearchState( &searchHead, search );
|
||||||
|
if( !state )
|
||||||
|
{
|
||||||
|
Mem_Free( search );
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
*handle = state->handle;
|
*handle = state->handle;
|
||||||
return state->search->filenames[0];
|
return state->search->filenames[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user