[Mono-bugs] [Bug 406763] New: NullReferenceException on "new Bitmap(null)"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 7 09:23:15 EDT 2008


           Summary: NullReferenceException on "new Bitmap(null)"
           Product: Mono: Class Libraries
           Version: SVN
          Platform: 32bit
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: daniel.grunwald at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Run the following code:
  Stream s = null;
  Bitmap bmp = new Bitmap(s);

Expected result:
System.ArgumentException: Value of 'null' is not valid for 'stream'.

Actual result:
System.NullReferenceException: Object reference not set to an instance of an
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000] in
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream, Boolean useIcm)
[0x00006] in
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream) [0x00000] in
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor

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.

More information about the mono-bugs mailing list