sw/source/filter/md/mdcallbcks.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 0d81f98c6fac6e11225df4249685539adc4336da Author: Ujjawal Kumar <[email protected]> AuthorDate: Mon Dec 8 22:05:25 2025 +0530 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Dec 12 11:39:14 2025 +0100 tdf#169884 fix crash due to missing empty check before removing element Change-Id: If2f02b9f67513645ab3d5b9ace7e8776d1c06d88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195236 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins (cherry picked from commit d38e5bc4102a228d49fdfeddc1e510e9b5bdd7ed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195515 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/filter/md/mdcallbcks.cxx b/sw/source/filter/md/mdcallbcks.cxx index 780f0999712b..0c2819c58ea8 100644 --- a/sw/source/filter/md/mdcallbcks.cxx +++ b/sw/source/filter/md/mdcallbcks.cxx @@ -239,7 +239,8 @@ int SwMarkdownParser::enter_span_callback(MD_SPANTYPE type, void* detail, void* int SwMarkdownParser::leave_span_callback(MD_SPANTYPE type, void* /*detail*/, void* userdata) { SwMarkdownParser* parser = static_cast<SwMarkdownParser*>(userdata); - parser->m_aAttrStack.pop_back(); + if (!parser->m_aAttrStack.empty()) + parser->m_aAttrStack.pop_back(); switch (type) { case MD_SPAN_IMG:
