Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45535 Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 65e0a57678..10d591457c 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -2089,7 +2089,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout) */ if (layout->len == 0) hr = layout_set_dummy_line_metrics(layout, 0); - else if (layout->clustermetrics[layout->cluster_count - 1].isNewline) + else if (layout->cluster_count && layout->clustermetrics[layout->cluster_count - 1].isNewline) hr = layout_set_dummy_line_metrics(layout, layout->len - 1); if (FAILED(hr)) return hr;