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 /groupbox.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 'groupbox.go')
-rw-r--r-- | groupbox.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/groupbox.go b/groupbox.go index d7de2041..600dd11a 100644 --- a/groupbox.go +++ b/groupbox.go @@ -88,7 +88,7 @@ func NewGroupBox(parent Container) (*GroupBox, error) { return gb.Title() }, func(v interface{}) error { - return gb.SetTitle(v.(string)) + return gb.SetTitle(assertStringOr(v, "")) }, gb.titleChangedPublisher.Event())) |