summaryrefslogtreecommitdiffstats
path: root/src/ithumb-writer.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2005-09-27 07:25:25 +0000
committerChristophe Fergeau <teuf@gnome.org>2005-09-27 07:25:25 +0000
commit5d38cbffd827dd36c7e7f91580ec31da9ebaf92d (patch)
tree9b7b473b8e72733ac29a6e6bd7d68f140c55f442 /src/ithumb-writer.c
parent6a0e830586380aafe71e9709814624057e21ca79 (diff)
downloadlibgpod-5d38cbffd827dd36c7e7f91580ec31da9ebaf92d.tar.gz
libgpod-5d38cbffd827dd36c7e7f91580ec31da9ebaf92d.tar.xz
libgpod-5d38cbffd827dd36c7e7f91580ec31da9ebaf92d.zip
2005-09-27 Christophe Fergeau <teuf@gnome.org>
* src/itdb_itunesdb.c: (write_mhsd_tracks), (write_playlist_mhips), (write_podcast_mhips): move variable declaration before code to fix compilation * src/db-artwork-parser.c: (ipod_parse_artwork_db): * src/db-artwork-writer.c: (ipod_write_artwork_db): * src/ithumb-writer.c: (ithumb_writer_new): added some sanity checks git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1103 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/ithumb-writer.c')
-rw-r--r--src/ithumb-writer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c
index 99c2f7a..671d96c 100644
--- a/src/ithumb-writer.c
+++ b/src/ithumb-writer.c
@@ -208,6 +208,11 @@ ithumb_writer_new (const char *mount_point, enum ItdbImageType type,
return NULL;
}
filename = ipod_image_get_ithmb_filename (mount_point, correlation_id);
+ if (filename == NULL) {
+ g_hash_table_destroy (writer->cache);
+ g_free (writer);
+ return NULL;
+ }
writer->f = fopen (filename, "w");
if (writer->f == NULL) {
g_print ("Error opening %s: %s\n", filename, strerror (errno));