Bug 12659

Summary: cairo_image_surface_get_data documentation
Product: cairo Reporter: Steve Chaplin <d74n5pohf9>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.5.1   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Steve Chaplin 2007-10-03 03:43:48 UTC
The documentation for cairo_image_surface_get_data is incomplete.
It says
"Returns : 	 a pointer to the image data of this surface or NULL if surface is not an image surface."

I think it should say
Returns : 	 a pointer to the image data of this surface or NULL if surface is not an image surface, or if cairo_surface_finish has been called."

Its important for cairo bindings to know that the surface can be an image surface AND NULL can be returned, and if NULL is not checked for a segmentation fault could occur.
Comment 1 Chris Wilson 2008-10-10 08:52:57 UTC
Thank you - documentation updated.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.