[evince] shell: fix a possible null pointer dereference



commit a830ccad4109db0fd040b31cde0e6d15f15ab669
Author: José Aliste <jaliste src gnome org>
Date:   Wed Oct 30 08:24:25 2013 -0300

    shell: fix a possible null pointer dereference

 shell/ev-daemon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index 3026114..c113072 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -203,7 +203,10 @@ document_loaded_cb (GDBusConnection *connection,
 
        g_variant_get (parameters, "(&s)", &uri);
         doc = ev_daemon_application_find_doc (application, uri);
-        if (doc != NULL && strcmp (uri, doc->uri) == 0) {
+
+       if (doc == NULL)
+               return;
+        if (strcmp (uri, doc->uri) == 0) {
                process_pending_invocations (application, uri, sender_name);
         }
 


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