[epiphany/gnome-3-8] uri-tester: fixed a G_CRITICAL when regexp was NULL
- From: Manuel Rego Casasnovas <manuelrego src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-8] uri-tester: fixed a G_CRITICAL when regexp was NULL
- Date: Thu, 4 Jul 2013 10:33:41 +0000 (UTC)
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 (®ex, g_regex_unref);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]