diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 78fb9cd0b331..2221f1ebe33f 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -256,7 +256,10 @@ OString lcl_unescapeLineFeeds(std::string_view i_rStr) std::string_view LineParser::readNextToken() { - OSL_PRECOND(m_nCharIndex!=std::string_view::npos,"insufficient input"); + if (m_nCharIndex == std::string_view::npos) { + SAL_WARN("sdext.pdfimport", "insufficient input"); + return {}; + } return o3tl::getToken(m_aLine,' ',m_nCharIndex); }