From e6a88a7d1f35c5f78e71658ae811dc87d896c7b9 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 21 Jul 2019 23:41:51 +0900 Subject: [PATCH] uidriver/glfw: Add panic in the case of Windows Remote Desktop Updates #903 --- internal/uidriver/glfw/ui.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index fc8b2c84b..1f96e69fb 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -117,6 +117,11 @@ func initialize() error { if err != nil { return err } + if w == nil { + // This can happen on Windows Remote Desktop (#903). + panic("ui: glfw.CreateWindow must not return nil") + } + // TODO: Fix this hack. currentMonitorImpl now requires u.window on POSIX. theUI.window = w theUI.initMonitor = theUI.currentMonitorFromPosition()