forked from AuroraMiddleware/gtk
Add sanity checks for GError handling. (#108345)
This commit is contained in:
parent
89ef7509b1
commit
691a5fd50a
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user