summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
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
parent89ef7509b18abb967f35c40b210faee83fe08165 (diff)
downloadgtk+-691a5fd50a39954c862cbe1fcfd6d88e6c40d95a.tar.gz
Add sanity checks for GError handling. (#108345)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog11
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c5
4 files changed, 20 insertions, 1 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 04cb40ff90..aa9f144939 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,14 @@
+2003-04-24 Matthias Clasen <maclas@gmx.de>
+
+ * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write):
+ (gdk_pixbuf_loader_new_with_type):
+ (gdk_pixbuf_loader_close):
+ * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
+ (gdk_pixbuf_save):
+ (gdk_pixbuf_savev):
+ * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
+ Add sanity checks for GError handling. (#108345)
+
Tue Apr 1 15:33:51 2003 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c (make_weights): Exploit the fact that all
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 354cc7740c..0a496bb7ad 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -137,6 +137,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
GdkPixbufModule *image_module;
g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
f = fopen (filename, "rb");
if (!f) {
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index cf3e8377b0..218c44c29d 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -694,6 +694,7 @@ gdk_pixbuf_new_from_file (const char *filename,
GdkPixbufModule *image_module;
g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
f = fopen (filename, "rb");
if (!f) {
@@ -914,6 +915,8 @@ gdk_pixbuf_save (GdkPixbuf *pixbuf,
gchar **values = NULL;
va_list args;
gboolean result;
+
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
va_start (args, error);
@@ -961,6 +964,7 @@ gdk_pixbuf_savev (GdkPixbuf *pixbuf,
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (type != NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
f = fopen (filename, "wb");
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index bf3602763e..79f7230a91 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;