[libgepub] lib: Fix obviously incorrect comparison



commit 81b37ad008889fe30ea91bb2d6fa5a8bbf7589b7
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 21 18:35:14 2017 +0200

    lib: Fix obviously incorrect comparison
    
    We assign "contents" but check "res" for != NULL...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784050

 libgepub/gepub-doc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgepub/gepub-doc.c b/libgepub/gepub-doc.c
index 316a65e..6d50785 100644
--- a/libgepub/gepub-doc.c
+++ b/libgepub/gepub-doc.c
@@ -576,7 +576,7 @@ gepub_doc_get_text_by_id (GepubDoc *doc, const gchar *id)
     g_return_val_if_fail (id != NULL, NULL);
 
     contents = gepub_doc_get_resource_by_id (doc, id);
-    if (!res) {
+    if (!contents) {
         return NULL;
     }
 


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