[gnome-epub-thumbnailer/wip/hadess/epub-workaround: 1/6] epub: Bail early when the cover path element doesn't exist




commit 8eadc8a7e8333f6cc3a7a4f5c6fd215368bf6411
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 28 17:14:42 2022 +0200

    epub: Bail early when the cover path element doesn't exist

 gnome-epub-thumbnailer.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index 841d8c7..7e4114e 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -258,6 +258,8 @@ get_cover_path_from_root_file (const char *metafile,
        }
 
        g_debug ("Found cover_path '%s'", cover_path);
+       if (!cover_path)
+               goto bail;
 
        full_cover_path = resolve_cover_path (cover_path, root_path);
        g_free (cover_path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]