vcl/source/gdi/CommonSalLayout.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a9aea4bb0d272ba0c2c8cb83714a2a8171297af6
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Sep 1 11:07:38 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 1 14:59:20 2022 +0200

    cid#1513473 Division or modulo by zero
    
    Change-Id: Ia08d3d8cb0942bfea6a28e178fcb843d2c74f1f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139151
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 014d4f738d9f..70bfb07aea8a 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -673,6 +673,9 @@ void 
GenericSalLayout::GetCharWidths(std::vector<DeviceCoordinate>& rCharWidths,
                 nGraphemeCount++;
             }
 
+            if (!nGraphemeCount)
+                continue;
+
             std::vector<DeviceCoordinate> aWidths(nGraphemeCount);
 
             // Check if the glyph has ligature caret positions.

Reply via email to