diff options
Diffstat (limited to 'libappstream-glib/as-app.c')
-rw-r--r-- | libappstream-glib/as-app.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 1bb6aff..128a9ef 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -5259,16 +5259,16 @@ as_app_search_matches (AsApp *app, const gchar *search) g_autoptr(GList) keys = NULL; g_autofree gchar *search_stem = NULL; - /* nothing to do */ - if (search == NULL) - return 0; - /* ensure the token cache is created */ if (g_once_init_enter (&priv->token_cache_valid)) { as_app_create_token_cache (app); g_once_init_leave (&priv->token_cache_valid, TRUE); } + /* nothing to do */ + if (search == NULL) + return 0; + /* find the exact match (which is more awesome than a partial match) */ search_stem = as_stemmer_process (priv->stemmer, search); match_pval = g_hash_table_lookup (priv->token_cache, search_stem); |