when loading an image, check that gimage_id != -1

--Sven
This commit is contained in:
Sven Neumann 2000-01-26 17:40:03 +00:00
parent 6895d48413
commit 6cba1d70ea
2 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,8 @@ Thu Jan 27 16:26:47 CET 2000 Sven Neumann <sven@gimp.org>
* plug-ins/common/gifload.c: fixed typo that made gimp crash when * plug-ins/common/gifload.c: fixed typo that made gimp crash when
loading a gif loading a gif
* app/fileops.c: guard against similar errors
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp> 2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
* plug-ins/gap/gap_decode_mpeg_main.c: added dummy menus * plug-ins/gap/gap_decode_mpeg_main.c: added dummy menus

View file

@ -678,7 +678,7 @@ file_open_image (gchar *filename,
procedural_db_destroy_args (return_vals, proc->num_values); procedural_db_destroy_args (return_vals, proc->num_values);
g_free (args); g_free (args);
if (*status == PDB_SUCCESS) if (*status == PDB_SUCCESS && gimage_id != -1)
{ {
layer_invalidate_previews (gimage_get_ID (gimage_id)); layer_invalidate_previews (gimage_get_ID (gimage_id));
channel_invalidate_previews (gimage_get_ID (gimage_id)); channel_invalidate_previews (gimage_get_ID (gimage_id));