mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 02:38:07 +02:00
[cairo-deflate-stream] Return the nil stream if creating from an error stream.
If _cairo_deflate_stream_create() is passed a stream in the error state, return a stream also in the error state, namely the _cairo_output_stream_nil.
This commit is contained in:
parent
dbbcb5c26f
commit
7601939a65
1 changed files with 6 additions and 0 deletions
|
|
@ -117,6 +117,12 @@ _cairo_deflate_stream_create (cairo_output_stream_t *output)
|
|||
{
|
||||
cairo_deflate_stream_t *stream;
|
||||
|
||||
if (output->status) {
|
||||
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
|
||||
return (cairo_output_stream_t *) &_cairo_output_stream_nil;
|
||||
}
|
||||
|
||||
|
||||
stream = malloc (sizeof (cairo_deflate_stream_t));
|
||||
if (stream == NULL) {
|
||||
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue