mirror of
https://gitlab.gnome.org/GNOME/eog
synced 2024-10-18 14:04:27 +00:00
fix crash when adding new non-image files to a directory eog watches
2005-10-24 Lucas Rocha <lucasr@cvs.gnome.org> * libeog/eog-thumbnail.c: fix crash when adding new non-image files to a directory eog watches (Fixes bug #311925) and when trying to view a PNG image with a JPEG extension (Fixes bug #316808). Patch from Callum McKenzie <callum@physics.otago.ac.nz>
This commit is contained in:
parent
7d1d28feb9
commit
fec97be5b5
|
@ -1,3 +1,11 @@
|
|||
2005-10-24 Lucas Rocha <lucasr@cvs.gnome.org>
|
||||
|
||||
* libeog/eog-thumbnail.c: fix crash when adding new
|
||||
non-image files to a directory eog watches (Fixes bug
|
||||
#311925) and when trying to view a PNG image with a
|
||||
JPEG extension (Fixes bug #316808). Patch from
|
||||
Callum McKenzie <callum@physics.otago.ac.nz>
|
||||
|
||||
2005-10-23 Lucas Rocha <lucasr@cvs.gnome.org>
|
||||
|
||||
* configure.in: change X development libraries checking to
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "eog-thumbnail.h"
|
||||
|
||||
#define THUMB_DEBUG 0
|
||||
#define THUMB_DEBUG 0
|
||||
#define EOG_THUMB_ERROR eog_thumb_error_quark ()
|
||||
|
||||
static GnomeThumbnailFactory *factory = NULL;
|
||||
|
@ -93,8 +93,7 @@ create_thumbnail (EogThumbData *data, GError **error)
|
|||
#endif
|
||||
g_assert (factory != NULL);
|
||||
|
||||
if (!gnome_thumbnail_factory_has_valid_failed_thumbnail (factory, data->uri_str, data->mtime) &&
|
||||
gnome_thumbnail_factory_can_thumbnail (factory, data->uri_str, data->mime_type, data->mtime))
|
||||
if (gnome_thumbnail_factory_can_thumbnail (factory, data->uri_str, data->mime_type, data->mtime))
|
||||
{
|
||||
thumb = gnome_thumbnail_factory_generate_thumbnail (factory, data->uri_str, data->mime_type);
|
||||
|
||||
|
@ -104,6 +103,9 @@ create_thumbnail (EogThumbData *data, GError **error)
|
|||
else {
|
||||
set_thumb_error (error, EOG_THUMB_ERROR_GENERIC, "Thumbnail creation failed");
|
||||
}
|
||||
}
|
||||
else {
|
||||
set_thumb_error (error, EOG_THUMB_ERROR_GENERIC, "Thumbnail creation failed");
|
||||
}
|
||||
|
||||
return thumb;
|
||||
|
|
Loading…
Reference in a new issue