summaryrefslogtreecommitdiff
path: root/colorbutton.go
diff options
context:
space:
mode:
Diffstat (limited to 'colorbutton.go')
-rw-r--r--colorbutton.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/colorbutton.go b/colorbutton.go
index 6b1f525..f10c5c8 100644
--- a/colorbutton.go
+++ b/colorbutton.go
@@ -33,7 +33,7 @@ func NewColorButton() *ColorButton {
// Colors are not alpha-premultiplied.
// TODO rename b or bl
func (b *ColorButton) Color() (r, g, bl, a float64) {
- c := C.pkguiNewColorDoubles()
+ c := C.pkguiAllocColorDoubles()
defer C.pkguiFreeColorDoubles(c)
C.uiColorButtonColor(b.b, c.r, c.g, c.b, c.a)
return float64(*(c.r)), float64(*(c.g)), float64(*(c.b)), float64(*(c.a))