2011/1/19 Pavol Klačanský <pa...@klacansky.com>: > Hi, why this code doesn't work > Here the item is null > Item item = null; > > parse_content(item); > And in this function you declared parameter as non-null > parse_content(Item item) { > stderr.printf("argh"); > } > > reports > ** (process:674): CRITICAL **: xml_parser_parse_content: assertion > `item != NULL' failed
Unlike Java and other languages Vala has idea of nullable references. You should declare your function as parse_content(Item? item) { pay attention to the question mark after the parameter type. _______________________________________________ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list