(Android) Fixed an issue where attempting to view invalid PDF files could crash the application

This commit is contained in:
Leon Styhre 2023-12-25 15:45:06 +01:00
parent 2687db1e17
commit 597f58aca0

View file

@ -305,7 +305,8 @@ bool PDFViewer::getDocumentInfo()
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
#elif defined(__ANDROID__)
ConvertPDF::processFile(mManualPath, "-fileinfo", 0, 0, 0, commandOutput);
if (ConvertPDF::processFile(mManualPath, "-fileinfo", 0, 0, 0, commandOutput) == -1)
return false;
#else
FILE* commandPipe;
std::array<char, 512> buffer {};