mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 08:10:11 +01:00
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>
This commit is contained in:
parent
899da0f486
commit
07d48a4c00
1 changed files with 2 additions and 0 deletions
|
|
@ -1721,6 +1721,8 @@ static int parse_connector(struct pipe_arg *pipe, const char *arg)
|
|||
return -1;
|
||||
|
||||
/* Parse the remaining parameters. */
|
||||
if (!endp)
|
||||
return -1;
|
||||
if (*endp == '@') {
|
||||
arg = endp + 1;
|
||||
pipe->crtc_id = strtoul(arg, &endp, 10);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue