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:
parent
3ea503f62c
commit
5492a6d99b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user