diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2018-12-05 16:12:29 +0100 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2018-12-05 16:12:29 +0100 |
commit | b92ba249476a0bdd676fa25445f311b5f65535ec (patch) | |
tree | 8d53c3744239d65612f50b2cb1c58fed588f5c52 /lineedit.go | |
parent | reflectExpression: Return nil if value is invalid (diff) | |
download | wireguard-windows-b92ba249476a0bdd676fa25445f311b5f65535ec.tar.xz wireguard-windows-b92ba249476a0bdd676fa25445f311b5f65535ec.zip |
Don't panic in property accessors if type assertion fails
Diffstat (limited to 'lineedit.go')
-rw-r--r-- | lineedit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lineedit.go b/lineedit.go index 1ba45e1c..d32bd3d4 100644 --- a/lineedit.go +++ b/lineedit.go @@ -67,7 +67,7 @@ func newLineEdit(parent Window) (*LineEdit, error) { return le.Text() }, func(v interface{}) error { - return le.SetText(v.(string)) + return le.SetText(assertStringOr(v, "")) }, le.textChangedPublisher.Event())) |