summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2021-06-28 15:02:42 +0000
committerColin Walters <walters@verbum.org>2021-06-28 15:02:42 +0000
commitb7a2d4dc599756c0d3792e695a97d2c2418111d3 (patch)
tree223bd6c39c37d535cb961fe55dd39f5f214e9a79
parent59c02f99394c6c2ccae9fdbe3b17bc5da4781585 (diff)
parent62f8ed6c8ef489201a19f1e28656c58b363ba851 (diff)
downloadlibglnx-b7a2d4dc599756c0d3792e695a97d2c2418111d3.tar.gz
Merge branch 'console-staticanalysis-fix' into 'master'
console: Pacify `gcc -fanalyzer` See merge request GNOME/libglnx!26
-rw-r--r--glnx-console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glnx-console.c b/glnx-console.c
index c2fe29d..0a96cdc 100644
--- a/glnx-console.c
+++ b/glnx-console.c
@@ -261,7 +261,7 @@ text_percent_internal (const char *text,
const guint textlen = MIN (input_textlen, ncolumns - bar_min);
const guint barlen = MIN (MAX_PROGRESSBAR_COLUMNS, ncolumns - (textlen + 1));
- if (textlen > 0)
+ if (text && textlen > 0)
{
fwrite (text, 1, textlen, stdout);
fputc (' ', stdout);