https://bugzilla.novell.com/show_bug.cgi?id=406763


           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: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          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
object
  at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000] in
/home/daniel/mono/mcs/class/System.Drawing/System.Drawing/Image.cs:266 
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream, Boolean useIcm)
[0x00006] in
/home/daniel/mono/mcs/class/System.Drawing/System.Drawing/Bitmap.cs:99 
  at System.Drawing.Bitmap..ctor (System.IO.Stream stream) [0x00000] in
/home/daniel/mono/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs:1 
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor
(System.IO.Stream)


-- 
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

Reply via email to