- dont do anything if the regex failes to compile
authorcodewarrior <codewarrior>
Tue, 8 Nov 2005 00:25:13 +0000 (00:25 +0000)
committercodewarrior <codewarrior@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Nov 2005 00:25:13 +0000 (00:25 +0000)
SVN revision: 18368

src/bin/e_fileman_smart.c

index 111efe5..4c32279 100644 (file)
@@ -2312,7 +2312,8 @@ _e_fm_icon_select_regex(E_Fm_Smart_Data *sd, char *glob)
    _e_fm_string_replace(glob, "*", ".*", tregex, (strlen(glob) + stars + 1)*sizeof(char));
    regex = calloc(strlen(tregex) + 3, sizeof(char));
    snprintf(regex, (strlen(tregex) + 3)*sizeof(char), "^%s$", tregex);
-   regcomp(&reg, regex, REG_NOSUB | REG_EXTENDED);   
+   if(regcomp(&reg, regex, REG_NOSUB | REG_EXTENDED))
+     return;
    _e_fm_selections_clear(sd);   
    for (l = sd->files; l; l = l->next)
      {