[gnome-epub-thumbnailer] epub: Don't look for a NULL metafile
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-epub-thumbnailer] epub: Don't look for a NULL metafile
- Date: Mon, 2 Sep 2013 01:08:38 +0000 (UTC)
commit 267dcdf9b52088cae7789cb13c530fe2e0f90597
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 2 02:23:29 2013 +0200
epub: Don't look for a NULL metafile
It's useless doing so, and only leads to confusion.
gnome-epub-thumbnailer.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index 1cb8149..20c81d9 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -263,6 +263,10 @@ file_to_data (const char *path,
/* Look for the cover in the metafile */
metafile = file_get_zipped_contents (path, (GCompareFunc) g_strcmp0, "META-INF/container.xml",
&length);
+ if (metafile == NULL) {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Could not find
META-INF/container.xml file");
+ return NULL;
+ }
cover_path = get_cover_path_from_root_file (metafile, length, path);
g_free (metafile);
if (cover_path != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]