2008-02-24 Jürg Billeter <j@bitron.ch>
+ * vala/valasemanticanalyzer.vala, gobject/valaccodegenerator.vala:
+ fix crash when using delegates as properties, fixes bug 517499
+
+2008-02-24 Jürg Billeter <j@bitron.ch>
+
* vala/parser.y, vala/vala.h, vala/valasymbolresolver.vala,
vala/valaunresolvedsymbol.vala, vala/valaunresolvedtype.vala:
generalize symbol resolving to fully support inner types
block.add_statement (new CCodeExpressionStatement (ccall));
// HACK: decrement the refcount before returning the value to simulate a weak reference getter function
- if (prop.type_reference.data_type.is_reference_counting ()) {
+ if (prop.type_reference.data_type != null && prop.type_reference.data_type.is_reference_counting ()) {
var unref_cond = new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, new CCodeIdentifier ("value"), new CCodeConstant ("NULL"));
var unref_function = new CCodeFunctionCall (get_destroy_func_expression (prop.type_reference));
unref_function.add_argument (new CCodeIdentifier ("value"));
* Reference counting types can simulate to return a weak
* reference */
if ((prop.is_abstract || prop.is_virtual) &&
+ prop.type_reference.data_type != null &&
prop.type_reference.data_type.is_reference_type () &&
!prop.type_reference.data_type.is_reference_counting () &&
!prop.type_reference.transfers_ownership)