mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 18:08:03 +02:00
[test/nil-surface] Test cairo_create(NULL). Crashing in cairo_push_group!
This commit is contained in:
parent
9cea8a4bb2
commit
52341f7e85
1 changed files with 19 additions and 0 deletions
|
|
@ -136,6 +136,25 @@ draw (cairo_t *cr, int width, int height)
|
|||
|
||||
cairo_destroy (cr2);
|
||||
|
||||
/*
|
||||
* 5. Create a cairo_t for the NULL surface.
|
||||
*/
|
||||
cr2 = cairo_create (NULL);
|
||||
|
||||
if (cairo_status (cr2) != CAIRO_STATUS_NULL_POINTER) {
|
||||
cairo_test_log ("Error: Received status of \"%s\" rather than expected \"%s\"\n",
|
||||
cairo_status_to_string (cairo_status (cr2)),
|
||||
cairo_status_to_string (CAIRO_STATUS_NULL_POINTER));
|
||||
return CAIRO_TEST_FAILURE;
|
||||
}
|
||||
|
||||
/* Test that push_group doesn't crash */
|
||||
cairo_push_group (cr2);
|
||||
cairo_stroke (cr2);
|
||||
cairo_pop_group (cr2);
|
||||
|
||||
cairo_destroy (cr2);
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue