From 23d0db54581c35dc92fc618887aa3d4ca8301946 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 25 Oct 2021 09:17:29 +0530 Subject: [PATCH] ... --- kitty/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/state.c b/kitty/state.c index f6e7d411c..86fc4e672 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -942,7 +942,7 @@ PYWRAP1(patch_global_colors) { if (!PyArg_ParseTuple(args, "Op", &spec, &configured)) return NULL; #define P(name) { \ PyObject *val = PyDict_GetItemString(spec, #name); \ - if (val) { \ + if (val && PyLong_Check(val)) { \ OPT(name) = PyLong_AsLong(val); \ } \ }