Explorar o código

bugfix if removed during focus event

Nicolas Cannasse %!s(int64=3) %!d(string=hai) anos
pai
achega
b1e694a8e2
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      h2d/TextInput.hx

+ 1 - 0
h2d/TextInput.hx

@@ -88,6 +88,7 @@ class TextInput extends Text {
 
 				var pt = new h2d.col.Point();
 				var scene = getScene();
+				if( scene == null ) return; // was removed
 				scene.startCapture(function(e) {
 					pt.x = e.relX;
 					pt.y = e.relY;