Skip to content

Commit ba3e26f

Browse files
committed
Option: fix a possible null reference segfault
1 parent 4f8d8de commit ba3e26f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/common/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ bool ffOptionParseBoolean(const char* str)
157157

158158
void ffOptionParseColorNoClear(const char* value, FFstrbuf* buffer)
159159
{
160-
if (value[0] == '\0') return;
160+
if (!value || value[0] == '\0') return;
161161

162162
// If value is already an ANSI escape code, use it
163163
if (value[0] == '\e' && value[1] == '[')

0 commit comments

Comments
 (0)