Set tv format property if output crtc is NULL
diff mbox

Message ID 1248843652-10497-1-git-send-email-ling.ma@intel.com
State Not Applicable
Headers show

Commit Message

ling.ma@intel.com July 29, 2009, 5 a.m. UTC
When TV is not connected and X start, after plugging TV cable again,
system will crash because output crtc is NULL. This patch will return,
do not handle crtc immediately, meanwhile set value will be effective
until user really enable output by xrandr command.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Ma Ling <ling.ma@intel.com>
---
 src/i830_tv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch
diff mbox

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 7082aba..df92a35 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1819,7 +1819,7 @@  i830_tv_set_property(xf86OutputPtr output, Atom property,
 	xfree (dev_priv->tv_format);
 	dev_priv->tv_format = val;
 
-	if (pI830->starting)
+	if (pI830->starting || output->crtc == NULL)
 	    return TRUE;
 
 	/* TV format change will generate new modelines, try