Check NULL pointer while opening filees to prevent Notepad++ from crash
Fix #14131, close #14094
This commit is contained in:
parent
670e2f098d
commit
cb1f2d1479
|
@ -59,6 +59,8 @@ std::string getFileContent(const TCHAR *file2read)
|
|||
char data[blockSize];
|
||||
std::string wholeFileContent = "";
|
||||
FILE *fp = _wfopen(file2read, TEXT("rb"));
|
||||
if (!fp)
|
||||
return "";
|
||||
|
||||
size_t lenFile = 0;
|
||||
do
|
||||
|
|
Loading…
Reference in New Issue