mirror of https://github.com/XEphem/XEphem.git
Only reset pointer if it is freed (#16)
The indentation shows these statements were supposed to be bracketed.
This commit is contained in:
parent
2bb4ec4918
commit
89c6a70620
|
|
@ -350,8 +350,10 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
|
||||||
comp->output_ptr[i]=NULL;
|
comp->output_ptr[i]=NULL;
|
||||||
}
|
}
|
||||||
if (comp->max_output_ptr != 0)
|
if (comp->max_output_ptr != 0)
|
||||||
|
{
|
||||||
png_free(png_ptr, comp->output_ptr);
|
png_free(png_ptr, comp->output_ptr);
|
||||||
comp->output_ptr=NULL;
|
comp->output_ptr=NULL;
|
||||||
|
}
|
||||||
/* write anything left in zbuf */
|
/* write anything left in zbuf */
|
||||||
if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
|
if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
|
||||||
png_write_chunk_data(png_ptr, png_ptr->zbuf,
|
png_write_chunk_data(png_ptr, png_ptr->zbuf,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue