aboutsummaryrefslogtreecommitdiff
path: root/src/SFileGetFileInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFileGetFileInfo.cpp')
-rw-r--r--src/SFileGetFileInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SFileGetFileInfo.cpp b/src/SFileGetFileInfo.cpp
index 20f5e75..5dd997d 100644
--- a/src/SFileGetFileInfo.cpp
+++ b/src/SFileGetFileInfo.cpp
@@ -428,6 +428,8 @@ bool WINAPI SFileGetFileInfo(
return GetInfo(pvFileInfo, cbFileInfo, &dwInt32Value, sizeof(DWORD), pcbLengthNeeded);
case SFileInfoFileIndex:
+ if(hf->ha == NULL)
+ return GetInfo_ReturnError(ERROR_INVALID_PARAMETER);
dwInt32Value = (DWORD)(pFileEntry - hf->ha->pFileTable);
return GetInfo(pvFileInfo, cbFileInfo, &dwInt32Value, sizeof(DWORD), pcbLengthNeeded);