We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9993228 commit 169b22cCopy full SHA for 169b22c
shell/platform/glfw/flutter_glfw.cc
@@ -184,6 +184,9 @@ static FlutterDesktopMessage ConvertToDesktopMessage(
184
// that a screen coordinate is one dp.
185
static double GetScreenCoordinatesPerInch() {
186
auto* primary_monitor = glfwGetPrimaryMonitor();
187
+ if (primary_monitor == nullptr) {
188
+ return kDpPerInch;
189
+ }
190
auto* primary_monitor_mode = glfwGetVideoMode(primary_monitor);
191
int primary_monitor_width_mm;
192
glfwGetMonitorPhysicalSize(primary_monitor, &primary_monitor_width_mm,
0 commit comments