Skip to content

Commit b110c5f

Browse files
hgutchhgutch
authored andcommitted
Readd a NULL check that got lost in r1.106.
This fixes PR lib/59945 (and its duplicate, PR bin/60001 ).
1 parent 804cf66 commit b110c5f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/libcurses/refresh.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: refresh.c,v 1.129 2024/12/23 02:58:04 blymn Exp $ */
1+
/* $NetBSD: refresh.c,v 1.130 2026/02/14 15:46:55 hgutch Exp $ */
22

33
/*
44
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
3434
#if 0
3535
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
3636
#else
37-
__RCSID("$NetBSD: refresh.c,v 1.129 2024/12/23 02:58:04 blymn Exp $");
37+
__RCSID("$NetBSD: refresh.c,v 1.130 2026/02/14 15:46:55 hgutch Exp $");
3838
#endif
3939
#endif /* not lint */
4040

@@ -1086,7 +1086,7 @@ putchbr(__LDATA *nsp, __LDATA *csp, __LDATA *psp, int wy, int wx)
10861086
/* We need to insert characters. */
10871087
#ifdef HAVE_WCHAR
10881088
cw = nsp->wcols;
1089-
pcw = psp->wcols;
1089+
pcw = (psp == NULL) ? 0 : psp->wcols;
10901090
if (cw < 1 || pcw < 1)
10911091
return ERR; /* Nothing to insert */
10921092

0 commit comments

Comments
 (0)