aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index b2a298f03..6c2cdfd8e 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -790,6 +790,9 @@ QRect ScreenRectangleForPoint(QPoint posGlobal)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
const QScreen *screen = QGuiApplication::screenAt(posGlobal);
+ if (!screen) {
+ screen = QGuiApplication::primaryScreen();
+ }
return screen->availableGeometry();
#else
const QDesktopWidget *desktop = QApplication::desktop();