From c42a72f99646a4888e6b4c806c809b93050e019f Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Tue, 7 Feb 2012 19:48:38 +0100 Subject: [PATCH 1/2] Remove debug statement --- shortcuts.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/shortcuts.c b/shortcuts.c index 735456f..b85c47a 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -19,8 +19,6 @@ bool sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t)) { - girara_info("in sc_abort"); - g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session->global.data != NULL, false); zathura_t* zathura = session->global.data; From 33e37b12e4dccbcdd762ec2f807ee6f3cb2a575e Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Tue, 7 Feb 2012 20:05:24 +0100 Subject: [PATCH 2/2] Resolve possible null pointer dereference --- zathura.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zathura.c b/zathura.c index a4c4019..964bed4 100644 --- a/zathura.c +++ b/zathura.c @@ -334,8 +334,10 @@ prepare_document_open_from_stdin(zathura_t* zathura) gint handle = g_file_open_tmp("zathura.stdin.XXXXXX", &file, &error); if (handle == -1) { - girara_error("Can not create temporary file: %s", error->message); - g_error_free(error); + if (error != NULL) { + girara_error("Can not create temporary file: %s", error->message); + g_error_free(error); + } return NULL; }