Fix segfault on cairo_pattern_t