diff options
author | Brian Paul <[email protected]> | 2006-01-10 15:48:56 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-01-10 15:48:56 +0000 |
commit | 1814d6541b1fb4bad67fb6277a6fcbe518453230 (patch) | |
tree | de36744c8029a6fb9ee4738435a8986cdc4ae816 /src/mesa/drivers/x11 | |
parent | 2d4ff6a8cf83ca3a829021482b08b95bea7aa31a (diff) |
added a couple new assertions to help debug XGL problem
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 2bcbd2c3b01..437c9e28461 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -253,6 +253,7 @@ static int bits_per_pixel( XMesaVisual xmv ) { const int depth = xmv->nplanes; int i; + assert(depth > 0); for (i = 0; i < screenInfo.numPixmapFormats; i++) { if (screenInfo.formats[i].depth == depth) return screenInfo.formats[i].bitsPerPixel; @@ -1563,6 +1564,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, * ColormapEntries is either (1U << index_bits) or * (1U << max(redBits, greenBits, blueBits)). */ + assert(visinfo->nplanes > 0); v->nplanes = visinfo->nplanes; v->ColormapEntries = visinfo->ColormapEntries; |