summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-png.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-06-01 23:05:46 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-06-01 23:05:46 +0000
commit741c71eb931cb85651e9f5aba99db4017dda180a (patch)
tree444a7bce25ce345738513c8159c1eb2d1a8c64f3 /gdk-pixbuf/io-png.c
parent11043de66f76cfb2e88693a365c857969ede7c74 (diff)
downloadgtk+-741c71eb931cb85651e9f5aba99db4017dda180a.tar.gz
Initial stab at getting the focus code to work.
Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data_func): s/GtkCellDataFunc/GtkTreeCellDataFunc. (_gtk_tree_view_column_set_tree_view): Use "notify::model" instead of "properties_changed" to help justify the death of the latter signal. (-: * tests/testtreefocus.c (main): Let some columns be focussable to test focus better.
Diffstat (limited to 'gdk-pixbuf/io-png.c')
-rw-r--r--gdk-pixbuf/io-png.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 21b1d4b296..611bc9b060 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/* GdkPixbuf library - PNG image loader
*
* Copyright (C) 1999 Mark Crichton
@@ -403,7 +404,8 @@ gdk_pixbuf__png_image_stop_load (gpointer context, GError **error)
* we have unused image data
*/
- gdk_pixbuf_unref(lc->pixbuf);
+ if (lc->pixbuf)
+ gdk_pixbuf_unref (lc->pixbuf);
png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
g_free(lc);
@@ -606,6 +608,8 @@ png_error_callback(png_structp png_read_ptr,
_("Fatal error reading PNG image file: %s"),
error_msg);
}
+
+ longjmp (png_read_ptr->jmpbuf, 1);
}
static void
@@ -639,7 +643,8 @@ gdk_pixbuf__png_image_save (FILE *f,
guchar *ptr;
guchar *pixels;
int x, y, j;
- png_bytep row_ptr, data = NULL;
+ png_bytep row_ptr;
+ png_bytep data;
png_color_8 sig_bit;
int w, h, rowstride;
int has_alpha;
@@ -661,6 +666,7 @@ gdk_pixbuf__png_image_save (FILE *f,
}
#endif
}
+ data = NULL;
bpc = gdk_pixbuf_get_bits_per_sample (pixbuf);
w = gdk_pixbuf_get_width (pixbuf);