[vte] ring: Don't attempt to close streams that weren't opened



commit 80c55b04d0c1d2a42ab236f9387274df50157d05
Author: Egmont Koblinger <egmont gmail com>
Date:   Thu Jan 8 22:56:25 2015 +0100

    ring: Don't attempt to close streams that weren't opened
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742606

 src/ring.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index f3fccc6..3d04453 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -93,9 +93,11 @@ _vte_ring_fini (VteRing *ring)
 
        g_free (ring->array);
 
-       g_object_unref (ring->attr_stream);
-       g_object_unref (ring->text_stream);
-       g_object_unref (ring->row_stream);
+       if (ring->has_streams) {
+               g_object_unref (ring->attr_stream);
+               g_object_unref (ring->text_stream);
+               g_object_unref (ring->row_stream);
+       }
 
        g_string_free (ring->utf8_buffer, TRUE);
 


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