소스 검색

checks if panel child is an IPanel

leonsal 8 년 전
부모
커밋
b4ade97dc9
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      gui/root.go

+ 4 - 2
gui/root.go

@@ -253,8 +253,10 @@ func (r *Root) sendPanels(x, y float32, evname string, ev interface{}) {
 		}
 		// Checks if any of its children also contains the position
 		for _, child := range pan.Children() {
-			ipan := child.(IPanel)
-			checkPanel(ipan)
+			ipan, ok := child.(IPanel)
+			if ok {
+				checkPanel(ipan)
+			}
 		}
 	}