GNOME Bugzilla – Bug 325444
Constructors of org.gnu.gdk.Pixmap don't handle null pointers
Last modified: 2006-01-09 06:30:08 UTC
Please describe the problem: The constructors described in the C API for the object GdkPixmap (http://developer.gnome.org/doc/API/2.0/gdk/gdk-Bitmaps-and-Pixmaps.html) allow some of their arguments to be NULL. When a null object is provided through the java API a null pointer it thrown. Steps to reproduce: 1. Pixmap buffer = new Pixmap(null, 20, 20, 24); 2. 3. Actual results: A null pointer is thrown. Expected results: I expect a pixmap to be created. Does this happen every time? Yes Other information: A patch will follow.
Created attachment 56629 [details] [review] Constructos handle null arguments This patch modifies the constructors in order to handle null arguments where allowed by the C API. The Javadocs for the constructors have been created.
Thanks for the patch. I've applied it to CVS HEAD with one slight addition, there was a case where transparent_color could be NULL and this had not been accounted for in the patch.
It's a good thing that you checked!