From f59f6ceed10267c52cfbdc458ecb1d9944b7d7a8 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 14 Aug 2021 14:00:07 +0000 Subject: [PATCH] Do not use NULL palette when clearing. --- usr.bin/tmux/colour.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/colour.c b/usr.bin/tmux/colour.c index 47e579536e8..e84e9031ae7 100644 --- a/usr.bin/tmux/colour.c +++ b/usr.bin/tmux/colour.c @@ -1,4 +1,4 @@ -/* $OpenBSD: colour.c,v 1.21 2021/08/11 20:49:55 nicm Exp $ */ +/* $OpenBSD: colour.c,v 1.22 2021/08/14 14:00:07 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -959,10 +959,10 @@ colour_palette_init(struct colour_palette *p) void colour_palette_clear(struct colour_palette *p) { - p->fg = 8; - p->bg = 8; if (p != NULL) { - free(p->palette); + p->fg = 8; + p->bg = 8; + free(p->palette); p->palette = NULL; } } -- 2.20.1