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 e3d73d5 commit 39a37adCopy full SHA for 39a37ad
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2527,7 +2527,9 @@ void setInitialBounds() {
2527
long display = GDK.gdk_display_get_default();
2528
if (display != 0) {
2529
long monitor = GDK.gdk_display_get_monitor_at_surface(display, paintSurface());
2530
- GDK.gdk_monitor_get_geometry(monitor, dest);
+ if (monitor != 0) {
2531
+ GDK.gdk_monitor_get_geometry(monitor, dest);
2532
+ }
2533
width = (int) (dest.width * SHELL_TO_MONITOR_RATIO);
2534
height = (int) (dest.height * SHELL_TO_MONITOR_RATIO);
2535
}
0 commit comments