Skip to content

Commit

Permalink
Merge pull request #1133 from andydotxyz/fix/1107
Browse files Browse the repository at this point in the history
Fix/1107
  • Loading branch information
andydotxyz committed Jun 28, 2020
2 parents 7f83254 + 6ebfe0a commit 194fc80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/driver/glfw/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (d *gLDriver) focusPreviousWindow() {
}
}

if chosen == nil {
if chosen == nil || chosen.(*window).view() == nil {
return
}
chosen.RequestFocus()
Expand Down
3 changes: 3 additions & 0 deletions internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ func (w *window) doShow() {
time.Sleep(time.Millisecond * 10)
}
w.createLock.Do(w.create)
if w.view() == nil {
return
}

runOnMain(func() {
w.viewLock.Lock()
Expand Down

0 comments on commit 194fc80

Please sign in to comment.