Fixed crashing bug in tab_windows.go.
This commit is contained in:
parent
3a16648b83
commit
0be1bf5caa
|
@ -58,6 +58,9 @@ func tabChanged(data unsafe.Pointer, new C.LRESULT) {
|
||||||
//export tabTabHasChildren
|
//export tabTabHasChildren
|
||||||
func tabTabHasChildren(data unsafe.Pointer, which C.LRESULT) C.BOOL {
|
func tabTabHasChildren(data unsafe.Pointer, which C.LRESULT) C.BOOL {
|
||||||
t := (*tab)(data)
|
t := (*tab)(data)
|
||||||
|
if len(t.tabs) == 0 { // currently no tabs
|
||||||
|
return C.FALSE
|
||||||
|
}
|
||||||
if t.tabs[int(which)].nchildren > 0 {
|
if t.tabs[int(which)].nchildren > 0 {
|
||||||
return C.TRUE
|
return C.TRUE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue