[vte/vte-0-48] spawn: async: Check for nullptr before unreffing
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-48] spawn: async: Check for nullptr before unreffing
- Date: Tue, 28 Mar 2017 20:59:39 +0000 (UTC)
commit ff1861f9235923b96c515a77cab82d98f8644c28
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 28 22:58:26 2017 +0200
spawn: async: Check for nullptr before unreffing
This needs to handle a null terminal. Improves the fix from
commit 8ad57f190f33c41b1bc9051e919844a294feada9.
(cherry picked from commit f7e3c8ad342c4965d433bf3b05f418b9e984aa1f)
src/vtegtk.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index f502d94..0247950 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]