aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-13 13:35:53 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-13 13:36:24 +0200
commit8d5885bfdf5d3501c87745a1bacfe786336c304d (patch)
tree37e2c2a11e8c6a655713b05ebd0f5f594ed32bde
parent41b5ddc744f0ee2325d2e5e9c33ca5046a6ab55d (diff)
downloadfiv-8d5885bfdf5d3501c87745a1bacfe786336c304d.tar.gz
fiv-8d5885bfdf5d3501c87745a1bacfe786336c304d.tar.xz
fiv-8d5885bfdf5d3501c87745a1bacfe786336c304d.zip
Prevent a possibility of GdkPixbuf crashes
-rw-r--r--fiv-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fiv-io.c b/fiv-io.c
index 2d5229d..b09cd57 100644
--- a/fiv-io.c
+++ b/fiv-io.c
@@ -3323,6 +3323,8 @@ fiv_io_open_from_data(
GError *err = NULL;
if ((surface = open_gdkpixbuf(data, len, ctx, &err))) {
g_clear_error(error);
+ } else if (!err) {
+ // Contrary to documentation, this is a possible outcome (libheif).
} else if (err->code == GDK_PIXBUF_ERROR_UNKNOWN_TYPE) {
g_error_free(err);
} else {