[gedit/color-markup-free] open-document-selector: don't free twice the same object



commit fe6a1fd8ee0b7918f4bfe8a7477a2decf4a2d201
Author: Sebastien Bacher <seb128 ubuntu com>
Date:   Wed Feb 27 17:23:57 2019 +0100

    open-document-selector: don't free twice the same object
    
    Dispose can be called a second time, set the variable to null after
    the free to avoid an invalid read, fix #129.

 gedit/gedit-open-document-selector.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gedit/gedit-open-document-selector.c b/gedit/gedit-open-document-selector.c
index 7a6feb5c2..f160b6743 100644
--- a/gedit/gedit-open-document-selector.c
+++ b/gedit/gedit-open-document-selector.c
@@ -751,6 +751,7 @@ gedit_open_document_selector_dispose (GObject *object)
        g_clear_pointer (&selector->name_font, pango_font_description_free);
        g_clear_pointer (&selector->path_font, pango_font_description_free);
        g_free (selector->match_markup_color);
+       selector->match_markup_color = NULL;
 
        if (selector->recent_items)
        {


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