src/lib/CDRContentCollector.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd421014aa3cec4e2d6b093592fc81a97ffa2131
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri May 22 20:54:08 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat May 23 17:46:54 2026 +0200

    guard tmpPath.back() on closing path with no prior moveto
    
    Add an empty() check.
    
    Change-Id: If1efac71aba717f161f1b16b5fd1c8b4c21639e8
    Reviewed-on: https://gerrit.libreoffice.org/c/libcdr/+/205586
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/src/lib/CDRContentCollector.cpp b/src/lib/CDRContentCollector.cpp
index 46e2fa6..e8e0291 100644
--- a/src/lib/CDRContentCollector.cpp
+++ b/src/lib/CDRContentCollector.cpp
@@ -315,7 +315,7 @@ void libcdr::CDRContentCollector::_flushCurrentPath()
       }
       else if (i()["librevenge:path-action"]->getStr() == "Z")
       {
-        if (tmpPath.back()["librevenge:path-action"] && 
tmpPath.back()["librevenge:path-action"]->getStr() != "Z")
+        if (!tmpPath.empty() && tmpPath.back()["librevenge:path-action"] && 
tmpPath.back()["librevenge:path-action"]->getStr() != "Z")
           tmpPath.push_back(i());
       }
     }

Reply via email to