Check NULL pointer while opening filees to prevent Notepad++ from crash

Fix #14131, close #14094
pull/14168/head
Dmitry 1 year ago committed by Don Ho
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…
Cancel
Save