summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2017-03-28 22:58:26 +0200
committerChristian Persch <chpe@src.gnome.org>2017-03-28 22:58:26 +0200
commitf7e3c8ad342c4965d433bf3b05f418b9e984aa1f (patch)
treecf664f48fc2159c9958d4e74404311e595bd703b
parent8ad57f190f33c41b1bc9051e919844a294feada9 (diff)
downloadvte-f7e3c8ad342c4965d433bf3b05f418b9e984aa1f.tar.gz
spawn: async: Check for nullptr before unreffing
This needs to handle a null terminal. Improves the fix from commit 8ad57f190f33c41b1bc9051e919844a294feada9.
-rw-r--r--src/vtegtk.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index f502d94b..02479500 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -2362,7 +2362,8 @@ spawn_async_cb (GObject *source,
spawn_async_callback_data_free(data);
- g_object_unref(terminal);
+ if (terminal != nullptr)
+ g_object_unref(terminal);
}