diff options
author | Uli Schlachter <psychon@znc.in> | 2011-07-27 20:30:12 +0200 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2011-07-29 09:23:15 +0200 |
commit | 5d72e59982edc21f3e15c46dc77408bce849e4f3 (patch) | |
tree | 215a54ddbe2c5e8886558eea5bf85aef78dbcbb6 /src/cairo-xcb-connection-core.c | |
parent | ec74912eeeb08a32170bbbf3a83290f21171c730 (diff) | |
download | cairo-5d72e59982edc21f3e15c46dc77408bce849e4f3.tar.gz |
xcb: Assert that pixmap sizes are positive
Currently, all the recording-* tests fail with an X11 error. This commit turns
those errors into failed assertions. Now someone just has to figure out why this
happens in the first place...
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-connection-core.c')
-rw-r--r-- | src/cairo-xcb-connection-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-xcb-connection-core.c b/src/cairo-xcb-connection-core.c index 089cc4e6b..5a2000470 100644 --- a/src/cairo-xcb-connection-core.c +++ b/src/cairo-xcb-connection-core.c @@ -43,6 +43,9 @@ _cairo_xcb_connection_create_pixmap (cairo_xcb_connection_t *connection, uint16_t height) { xcb_pixmap_t pixmap = _cairo_xcb_connection_get_xid (connection); + + assert (width > 0); + assert (height > 0); xcb_create_pixmap (connection->xcb_connection, depth, pixmap, drawable, width, height); |