lib/ios: do not crash when removing a non-View control
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 8 Apr 2016 18:57:51 +0000 (14:57 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 15 Apr 2016 15:31:47 +0000 (11:31 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/ios/ui/ui.nit

index 96d1e8a..ad6df0d 100644 (file)
@@ -120,9 +120,9 @@ redef class CompositeControl
        do
                super
 
-               var native_view = view.native
-               assert native_view isa UIView
-               native_view.remove_from_superview
+               if view isa View then
+                       view.native.remove_from_superview
+               end
        end
 end