Don't crash on failure to find a cover file - #1001559
parent
16860320ab
commit
b341bf5e05
@ -0,0 +1,27 @@
|
||||
From 68841e9a7658b6bafd4d94f4199ea047d303f1d3 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Sun, 1 Sep 2013 17:26:13 +0200
|
||||
Subject: [PATCH] epub: Set an error when the cover can't be found
|
||||
|
||||
This stops a crash in the thumbnailer if the cover cannot
|
||||
be found.
|
||||
---
|
||||
gnome-epub-thumbnailer.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
|
||||
index e2a3615..1cb8149 100644
|
||||
--- a/gnome-epub-thumbnailer.c
|
||||
+++ b/gnome-epub-thumbnailer.c
|
||||
@@ -283,7 +283,7 @@ file_to_data (const char *path,
|
||||
}
|
||||
|
||||
if (cover_data == NULL) {
|
||||
- g_warning ("Could not find cover file in '%s'", path);
|
||||
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Could not find cover file");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in new issue