From 597f58aca08c210eae7e1e12a47a5ee386ff706c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 25 Dec 2023 15:45:06 +0100 Subject: [PATCH] (Android) Fixed an issue where attempting to view invalid PDF files could crash the application --- es-app/src/PDFViewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-app/src/PDFViewer.cpp b/es-app/src/PDFViewer.cpp index a7f539656..81cfb3dad 100644 --- a/es-app/src/PDFViewer.cpp +++ b/es-app/src/PDFViewer.cpp @@ -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 buffer {};