Do not call g_regex_ref() on NULL

master
Yevgen Muntyan 2007-06-02 16:11:24 -05:00
parent 748e805303
commit 3d5c9589eb
2 changed files with 5 additions and 5 deletions

View File

@ -318,16 +318,16 @@
</kdevdoctreeview>
<kdevfilecreate>
<filetypes>
<type icon="source" ext="g" create="template" name="GAP source" >
<type icon="source" ext="g" name="GAP source" create="template" >
<descr>A new empty GAP source file</descr>
</type>
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
<descr>A new empty C++ file.</descr>
</type>
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
<descr>A new empty header file for C/C++.</descr>
</type>
<type icon="source_c" ext="c" create="template" name="C Source" >
<type icon="source_c" ext="c" name="C Source" create="template" >
<descr>A new empty C file.</descr>
</type>
</filetypes>

View File

@ -603,7 +603,7 @@ static GRegex *
moo_find_get_regex (MooFind *find)
{
g_return_val_if_fail (MOO_IS_FIND (find), NULL);
return g_regex_ref (find->regex);
return find->regex ? g_regex_ref (find->regex) : NULL;
}