diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2009-03-06 13:52:19 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-03-07 17:49:08 +1000 |
commit | 19229fcf3a6eaf5e64b10b43aa5e8619444791b4 (patch) | |
tree | b7bbbdfc9f0cecdbc1dbdb1192e6dc2396b50c7f /src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c | |
parent | a06dd4de8756d7ebe99ed414c8d8dca5083241b8 (diff) |
Fix nouveau_pipe_create() / nouveau_context_init(): raise an error if the screen/pipe creation failed
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c')
-rw-r--r-- | src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c index b6199f8e6d..52c3b02247 100644 --- a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c +++ b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys.c @@ -133,8 +133,13 @@ nouveau_pipe_create(struct nouveau_context *nv) ws = nouveau_create_pipe_winsys(nv); - if (!nvc->pscreen) + if (!nvc->pscreen) { nvc->pscreen = hws_create(ws, nvws); + if (!nvc->pscreen) { + NOUVEAU_ERR("Couldn't create hw screen\n"); + return NULL; + } + } nvc->pctx[nv->pctx_id] = hw_create(nvc->pscreen, nv->pctx_id); return nvc->pctx[nv->pctx_id]; } |