JsRender/NodeToGtk.vala
authorAlan Knowles <alan@roojs.com>
Fri, 12 Sep 2014 08:48:50 +0000 (16:48 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 12 Sep 2014 08:48:50 +0000 (16:48 +0800)
JsRender/NodeToGtk.vala

index d3977b9..8b88afe 100644 (file)
@@ -48,7 +48,10 @@ public class JsRender.NodeToGtk : Object {
 
                if (gtype.is_a((typeof(Gtk.Window))) {
                        // what if it has none...
-                       return this.mungeChild(this.items.get(0));
+                       if (this.node.items.size < 1) {
+                               return null;
+                       }
+                       return this.mungeChild(this.node.items.get(0));
                }
 
                var ret = Object.new(gtype);