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>
return -1;
/* Parse the remaining parameters. */
return -1;
/* Parse the remaining parameters. */
+ if (!endp)
+ return -1;
if (*endp == '@') {
arg = endp + 1;
pipe->crtc_id = strtoul(arg, &endp, 10);
if (*endp == '@') {
arg = endp + 1;
pipe->crtc_id = strtoul(arg, &endp, 10);