[cairo-pattern] Add an ASSERT_NOT_REACHED

On the default case for an unknown pattern type, add an assert that the
code is never reached, and just in case upgrade the error to a fatal
PATTERN_TYPE_MISMATCH.
This commit is contained in:
Chris Wilson 2008-01-12 20:35:56 +00:00
parent 973d5fa8a5
commit 481b88dd6b

View file

@ -1828,7 +1828,8 @@ _cairo_pattern_acquire_surface (cairo_pattern_t *pattern,
attributes);
} break;
default:
status = CAIRO_INT_STATUS_UNSUPPORTED;
ASSERT_NOT_REACHED;
status = _cairo_error (CAIRO_STATUS_PATTERN_TYPE_MISMATCH);
}
return status;