summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-loader.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2003-04-24 18:51:07 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-04-24 18:51:07 +0000
commit691a5fd50a39954c862cbe1fcfd6d88e6c40d95a (patch)
treec4faf69e0a3933a1c9d15653001cac43bf928586 /gdk-pixbuf/gdk-pixbuf-loader.c
parent89ef7509b18abb967f35c40b210faee83fe08165 (diff)
downloadgdk-pixbuf-691a5fd50a39954c862cbe1fcfd6d88e6c40d95a.tar.gz
Add sanity checks for GError handling. (#108345)
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index bf3602763..79f7230a9 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -423,6 +423,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
g_return_val_if_fail (buf != NULL, FALSE);
g_return_val_if_fail (count >= 0, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
priv = loader->priv;
@@ -499,11 +500,12 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
{
GdkPixbufLoader *retval;
GError *tmp;
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL);
tmp = NULL;
- gdk_pixbuf_loader_load_module(retval, image_type, &tmp);
+ gdk_pixbuf_loader_load_module (retval, image_type, &tmp);
if (tmp != NULL)
{
g_propagate_error (error, tmp);
@@ -602,6 +604,7 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
g_return_val_if_fail (loader != NULL, TRUE);
g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), TRUE);
+ g_return_val_if_fail (error == NULL || *error == NULL, TRUE);
priv = loader->priv;