[nautilus] mime-actions: check for valid error before dereferencing
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] mime-actions: check for valid error before dereferencing
- Date: Sat, 13 May 2017 20:04:01 +0000 (UTC)
commit 1e898de96648fa9cb12653ed129c7ed2b0c26c72
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat May 13 22:57:19 2017 +0300
mime-actions: check for valid error before dereferencing
After launching a URI, the code checks if the operation has been
canceled, but does not check if the error pointer is valid.
https://bugzilla.gnome.org/show_bug.cgi?id=781132
src/nautilus-mime-actions.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 2fc5320..ab69c60 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1540,7 +1540,7 @@ on_launch_default_for_uri (GObject *source_object,
sandboxed = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
nautilus_launch_default_for_uri_finish (res, &error);
- if (!sandboxed && error->code != G_IO_ERROR_CANCELLED)
+ if (!sandboxed && error != NULL && error->code != G_IO_ERROR_CANCELLED)
{
g_queue_push_tail (params->unhandled_uris, uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]