diff options
author | Ben Skeggs <skeggsb@beleth.(none)> | 2009-11-04 17:31:18 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@beleth.(none)> | 2009-11-04 17:31:18 +1000 |
commit | b7ed162d2912d53d03d94f9ceaebf7d96d570c04 (patch) | |
tree | 0ccb86c647db9504093204491f3a3cbbdf0f7fab | |
parent | f4c50630269df4201b89a538cbf8e11646f17d82 (diff) |
nouveau: turn another assertion into an error
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
-rw-r--r-- | libdrm/nouveau/nouveau_pushbuf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdrm/nouveau/nouveau_pushbuf.c b/libdrm/nouveau/nouveau_pushbuf.c index df43effc..90250c02 100644 --- a/libdrm/nouveau/nouveau_pushbuf.c +++ b/libdrm/nouveau/nouveau_pushbuf.c @@ -87,8 +87,12 @@ nouveau_pushbuf_emit_reloc(struct nouveau_channel *chan, void *ptr, domains |= NOUVEAU_GEM_DOMAIN_VRAM; if (flags & NOUVEAU_BO_GART) domains |= NOUVEAU_GEM_DOMAIN_GART; + + if (!(pbbo->valid_domains & domains)) { + fprintf(stderr, "no valid domains remain!\n"); + return -EINVAL; + } pbbo->valid_domains &= domains; - assert(pbbo->valid_domains); assert(flags & NOUVEAU_BO_RDWR); if (flags & NOUVEAU_BO_RD) { |