diff options
author | Alexander Neumann <alexander.neumann@picos-software.com> | 2017-02-28 14:13:37 +0100 |
---|---|---|
committer | Alexander Neumann <alexander.neumann@picos-software.com> | 2017-02-28 14:13:37 +0100 |
commit | 93f3fc9f3378585dc2ca3fbb6f1cdbd445447135 (patch) | |
tree | 810b2e4a395f915e0cd5b40c4afa140479b29d79 /imagelist.go | |
parent | Use some new stuff in webview example (diff) | |
download | wireguard-windows-93f3fc9f3378585dc2ca3fbb6f1cdbd445447135.tar.xz wireguard-windows-93f3fc9f3378585dc2ca3fbb6f1cdbd445447135.zip |
Fix image list creation regression
Diffstat (limited to 'imagelist.go')
-rw-r--r-- | imagelist.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/imagelist.go b/imagelist.go index 6c6c75e0..13cd6a09 100644 --- a/imagelist.go +++ b/imagelist.go @@ -84,6 +84,12 @@ func (il *ImageList) MaskColor() Color { } func imageListForImage(image interface{}) (hIml win.HIMAGELIST, isSysIml bool, err error) { + if name, ok := image.(string); ok { + if img, err := Resources.Image(name); err == nil { + image = img + } + } + if filePath, ok := image.(string); ok { _, hIml = iconIndexAndHImlForFilePath(filePath) isSysIml = hIml != 0 |