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 5dd997d..1746fa0 100644
--- a/src/SFileGetFileInfo.cpp
+++ b/src/SFileGetFileInfo.cpp
@@ -452,6 +452,8 @@ bool WINAPI SFileGetFileInfo(
return GetInfo(pvFileInfo, cbFileInfo, &hf->dwFileKey, sizeof(DWORD), pcbLengthNeeded);
case SFileInfoEncryptionKeyRaw:
+ if(pFileEntry == NULL)
+ return GetInfo_ReturnError(ERROR_INVALID_PARAMETER);
dwInt32Value = hf->dwFileKey;
if(pFileEntry->dwFlags & MPQ_FILE_KEY_V2)
dwInt32Value = (dwInt32Value ^ pFileEntry->dwFileSize) - (DWORD)hf->MpqFilePos;