-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
Linux/GTKHappens on LinuxHappens on Linux
Description
Describe the bug
When creating a Cairo surface, an SWT error is thrown if a null pointer is returned.
eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
Lines 288 to 289 in 28bb9b4
| surface = Cairo.cairo_image_surface_create(format, dataWidth, dataHeight); | |
| if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); |
But per the documentation of this method:
This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this.
Note: The same is true for gdk_window_create_similar_surface
In short: This check should always succeed.
Metadata
Metadata
Assignees
Labels
Linux/GTKHappens on LinuxHappens on Linux