modetest: Fix segmentation fault
When a mode is set with just a connector "-s foo", we get a nasty segmentation fault. Fix it. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>main
parent
899da0f486
commit
07d48a4c00
|
@ -1721,6 +1721,8 @@ static int parse_connector(struct pipe_arg *pipe, const char *arg)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Parse the remaining parameters. */
|
/* Parse the remaining parameters. */
|
||||||
|
if (!endp)
|
||||||
|
return -1;
|
||||||
if (*endp == '@') {
|
if (*endp == '@') {
|
||||||
arg = endp + 1;
|
arg = endp + 1;
|
||||||
pipe->crtc_id = strtoul(arg, &endp, 10);
|
pipe->crtc_id = strtoul(arg, &endp, 10);
|
||||||
|
|
Loading…
Reference in New Issue