diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 23:22:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-02 07:51:41 +0100 |
commit | 2c5647a18e7856b604bce70270463fc128c2cfcd (patch) | |
tree | ef186c1db6909013e4f3c97c37a2b26cd109c075 | |
parent | 7867bff00caeff9e1fbe569ca3d37b94f704a4cd (diff) |
sna: NameForAtom may return NULL
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 2 | ||||
-rw-r--r-- | src/sna/sna_video_textured.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 5ed31794..9fd59f8f 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1509,6 +1509,8 @@ sna_output_set_property(xf86OutputPtr output, Atom property, return FALSE; memcpy(&atom, value->data, 4); name = NameForAtom(atom); + if (name == NULL) + return FALSE; /* search for matching name string, then set its value down */ for (j = 0; j < p->mode_prop->count_enums; j++) { diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index bc117a4a..33f3f712 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -387,7 +387,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna, return NULL; } - if (sna->kgem.wedged) { + if (wedged(sna)) { xf86DrvMsg(sna->scrn->scrnIndex, X_WARNING, "cannot enable XVideo whilst the GPU is wedged\n"); return FALSE; |