For some reason brave configured for as a wayland client triggers this code on startup and segfaults.
Checking if the client is mapped fixes this, like with the previous fix for urgent border colour.
References: 887fde65a3010905aa10f373cfcfe540cfc1781e Fixes: 72a7d78a1a7926a207539eb50f44b2e1eb089d49
ZRUD4MWOJKZEOAW5E72HXJ6SFS7OPQKWSJ66QBFUQJTSG72DHDLQC