diff --git a/ChangeLog b/ChangeLog index 55fbec715..b8cadb06a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-06 Mike Kestner + + * atk/Object.custom: use 'as StateSet' instead of cast to avoid + cast exceptions in the null case. + 2008-06-06 Andres G. Aragoneses * atk/Object.custom: diff --git a/atk/Object.custom b/atk/Object.custom index 2e6ec634a..ff5e889a6 100644 --- a/atk/Object.custom +++ b/atk/Object.custom @@ -140,8 +140,9 @@ } [GLib.DefaultSignalHandler (Type=typeof(Atk.Object), ConnectionMethod="OverrideRefStateSet")] - protected virtual Atk.StateSet OnRefStateSet () { + protected virtual Atk.StateSet OnRefStateSet () + { IntPtr raw = atksharp_object_base_ref_state_set (Handle); - return (Atk.StateSet) GLib.Object.GetObject (raw, true); + return GLib.Object.GetObject (raw, true) as StateSet; }