summaryrefslogtreecommitdiff
path: root/prefsize_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'prefsize_darwin.go')
-rw-r--r--prefsize_darwin.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/prefsize_darwin.go b/prefsize_darwin.go
index 316662e..630969e 100644
--- a/prefsize_darwin.go
+++ b/prefsize_darwin.go
@@ -15,6 +15,7 @@ var (
)
func (s *sysData) preferredSize() (width int, height int) {
+if classTypes[s.ctype].make == nil { return 0, 0 } // prevent lockup during window resize
cell := C.objc_msgSend_noargs(s.id, _cell)
cs := C.objc_msgSend_stret_size_noargs(cell, _cellSize)
return int(cs.width), int(cs.height)