diff options
author | Debarshi Ray <debarshir@gnome.org> | 2018-09-08 16:22:48 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-09-10 07:14:53 +0200 |
commit | f7592463ab63326e3f0d2af7f6aff105f91d7ce0 (patch) | |
tree | c60eda0a96c063cde29474d2b8ee8ca3e1b15699 /gdk-pixbuf | |
parent | 38060f9368c6aef74001d31f9d53a870ca6c80a9 (diff) | |
download | gdk-pixbuf-f7592463ab63326e3f0d2af7f6aff105f91d7ce0.tar.gz |
io-png: Remove redundant NULL check
png_destroy_read_struct is safe against both a NULL png_infop and
pointer to a NULL png_infop.
Fallout from e8d0d8ed3d33ee6cedb75a394c36af3312b310ff
https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/16
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/io-png.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index b7f27e24a..06cf36595 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -488,8 +488,7 @@ gdk_pixbuf__png_image_begin_load (GdkPixbufModuleSizeFunc size_func, } if (setjmp (png_jmpbuf(lc->png_read_ptr))) { - if (lc->png_info_ptr) - png_destroy_read_struct(&lc->png_read_ptr, &lc->png_info_ptr, NULL); + png_destroy_read_struct(&lc->png_read_ptr, &lc->png_info_ptr, NULL); g_free(lc); /* error callback should have set the error */ return NULL; |