[epiphany/gnome-3-8] uri-tester: fixed a G_CRITICAL when regexp was NULL



commit 63042cfaf8b99eca69d1899e6164621617e15cd5
Author: Sergio Villar Senin <svillar igalia com>
Date:   Mon Jun 17 11:36:06 2013 +0200

    uri-tester: fixed a G_CRITICAL when regexp was NULL
    
    Do not unconditionally unref the regexp in case of error because it could be
    NULL.

 embed/uri-tester.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/embed/uri-tester.c b/embed/uri-tester.c
index 7af0c56..1d1283f 100644
--- a/embed/uri-tester.c
+++ b/embed/uri-tester.c
@@ -482,7 +482,7 @@ uri_tester_compile_regexp (UriTester *tester,
     {
       g_warning ("%s: %s", G_STRFUNC, error->message);
       g_error_free (error);
-      g_regex_unref (regex);
+      g_clear_pointer (&regex, g_regex_unref);
       return TRUE;
     }
 


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