Use filetype_has_tags().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1580 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-05-26 15:26:05 +00:00
parent 3ea503f62c
commit 5492a6d99b
2 changed files with 3 additions and 1 deletions

View File

@ -900,6 +900,8 @@ GtkFileFilter *filetypes_create_file_filter(filetype *ft)
// Indicates whether there is a tag parser for the filetype or not.
gboolean filetype_has_tags(filetype *ft)
{
g_return_val_if_fail(ft != NULL, FALSE);
return ft->lang >= 0;
}

View File

@ -693,7 +693,7 @@ static filetype *detect_global_tags_filetype(const gchar *utf8_filename)
}
g_free(shortname);
if (filetypes[FILETYPE_ID(ft)]->lang < 0)
if (ft == NULL || ! filetype_has_tags(ft))
return NULL;
return ft;
}