uidriver/glfw: Add panic in the case of Windows Remote Desktop

Updates #903
This commit is contained in:
Hajime Hoshi 2019-07-21 23:41:51 +09:00
parent b348223297
commit e6a88a7d1f

View File

@ -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()