aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/TextLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osx/graphics/quartz/TextLayout.cpp')
-rw-r--r--src/osx/graphics/quartz/TextLayout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osx/graphics/quartz/TextLayout.cpp b/src/osx/graphics/quartz/TextLayout.cpp
index 41d04958..5145f9f9 100644
--- a/src/osx/graphics/quartz/TextLayout.cpp
+++ b/src/osx/graphics/quartz/TextLayout.cpp
@@ -146,6 +146,8 @@ Point OsxCTTextLayout::TextSinglePoint(Index position, bool trailing) {
}
}
+ if (lines_.empty()) return Point{};
+
return Convert(CTLineGetImageBounds(lines_.back(), nullptr)).GetRightTop();
}