avoid crash when selecting a new filter and clicking a different directory

2003-09-15  Bastien Nocera  <hadess@hadess.net>

	* gtkfilefilter.c: (gtk_file_filter_filter): avoid crash when
	selecting a new filter and clicking a different directory
This commit is contained in:
Bastien Nocera 2003-09-15 10:27:05 +00:00 committed by Bastien Nocera
parent c647c4dd51
commit 52617a691a

View File

@ -354,7 +354,8 @@ gtk_file_filter_filter (GtkFileFilter *filter,
switch (rule->type)
{
case FILTER_RULE_MIME_TYPE:
if (strcmp (rule->u.mime_type, filter_info->mime_type) == 0)
if (filter_info->mime_type != NULL
&& strcmp (rule->u.mime_type, filter_info->mime_type) == 0)
return TRUE;
break;
case FILTER_RULE_PATTERN: