uidriver/glfw: Bug fix: Crash on Wine when getting a monitor

This commit is contained in:
Hajime Hoshi 2020-08-23 02:31:52 +09:00
parent 77fa0cb9ef
commit 10d6a3ad67

View File

@ -145,7 +145,8 @@ func (u *UserInterface) currentMonitorFromPosition() *glfw.Monitor {
m, err := monitorFromWindow(w, monitorDefaultToNearest)
if err != nil {
panic(err)
// monitorFromWindow can return error on Wine. Ignore this.
return glfw.GetPrimaryMonitor()
}
mi := monitorInfo{}