summaryrefslogtreecommitdiff
path: root/dialog.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-08 13:00:21 -0400
committerPietro Gagliardi <[email protected]>2014-06-08 13:00:21 -0400
commit41085768e71997a32a0ad39a351b66e8e2bbccfc (patch)
treec80a0392dea8fff8f0526890a3370f69870d6b45 /dialog.go
parentbb6de0de48e96193cfba59042bdca9aa1eefb67f (diff)
Made the application-modal sentinel in dialog.go non-nil to prevent weird behavior on nil Windows in program code. Thanks to xtg in the Gopher Academy Slack for corroborating.
Diffstat (limited to 'dialog.go')
-rw-r--r--dialog.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/dialog.go b/dialog.go
index 7bda715..6ff5ff4 100644
--- a/dialog.go
+++ b/dialog.go
@@ -6,8 +6,9 @@ import (
// ...
)
-// sentinel (presently nil; may be a private instance if subtle bugs start showing up in user code)
-var dialogWindow *Window
+// sentinel (not nil so programmer errors don't go undetected)
+// this window is invalid and cannot be used directly
+var dialogWindow = new(Window)
// MsgBox displays an informational message box to the user with just an OK button.
// primaryText should be a short string describing the message, and will be displayed with additional emphasis on platforms that support it.