https://bugzilla.novell.com/show_bug.cgi?id=667714
https://bugzilla.novell.com/show_bug.cgi?id=667714#c0 Summary: ImageIO/CGImageDestination.cs source code error Classification: Mono Product: MonoTouch Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Critical Priority: P5 - None Component: Class Libraries AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Customer Blocker: Yes https://github.com/mono/maccore/blob/master/src/ImageIO/CGImageDestination.cs The FromData/FromUrl methods call dict.Dispose (); without checking that dict is non NULL, which causes a exception. public static CGImageDestination FromData (NSData data, string typeIdentifier, int imageCount, CGImageDestinationOptions options) { if (data == null) throw new ArgumentNullException ("data"); if (typeIdentifier == null) throw new ArgumentNullException ("typeIdentifier"); var dict = options == null ? null : options.ToDictionary (); var ret = new CGImageDestination (CGImageDestinationCreateWithData (data.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle)); // ERROR: dict is NULL most of the time dict.Dispose (); return ret; } Also, I would prefer that the method names match those of the wrapped API function: FromData/FromUrl should be CreateWithData/CreateWithUrl so as to ùake them easier to find and understand.... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
