Merge pull request #19864 from lewis6991/decorfix

fix(ui): don't allow decor provider with ns_id==0
This commit is contained in:
bfredl 2022-08-21 21:11:56 +02:00 committed by GitHub
commit c086bf6079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -174,6 +174,7 @@ void decor_providers_invoke_end(DecorProviders *providers, char **err)
DecorProvider *get_decor_provider(NS ns_id, bool force)
{
assert(ns_id > 0);
size_t i;
size_t len = kv_size(decor_providers);
for (i = 0; i < len; i++) {

View File

@ -174,6 +174,11 @@ int ns_get_hl(NS *ns_hl, int hl_id, bool link, bool nodefault)
{
static int recursive = 0;
if (*ns_hl == 0) {
// ns=0 (the default namespace) does not have a provider so stop here
return -1;
}
if (*ns_hl < 0) {
if (ns_hl_active <= 0) {
return -1;