Subject: [PATCH V2] Stop setting tv format property if crtc is NULL When TV is not connected and X start, after plugging TV cable again, user must assign output crtc by xrandr command before set TV format property. This patch will return FALSE to avoid system crash if output crtc is NULL. Signed-off-by: Ma Ling --- src/i830_tv.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/i830_tv.c b/src/i830_tv.c index 7082aba..6110b45 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -1821,6 +1821,12 @@ i830_tv_set_property(xf86OutputPtr output, Atom property, if (pI830->starting) return TRUE; + if (output->crtc == NULL) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "Set TV Format Property error," + "CRTC is not available\n"); + return FALSE; + } /* TV format change will generate new modelines, try to probe them and update outputs. */ -- 1.5.4.4