xserver: Branch 'glucose-2'
Alan Hourihane
alanh at kemper.freedesktop.org
Fri Mar 30 18:01:06 EEST 2007
glucose/glucose.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
New commits:
diff-tree 1970562753660729dc0cecab8072dd991cfd61da (from 1883400b37f9b1c872742e2c3280cd934b02e8a6)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date: Fri Mar 30 16:01:04 2007 +0100
Add more error checking.
diff --git a/glucose/glucose.c b/glucose/glucose.c
index ff44a7a..b21ef59 100644
--- a/glucose/glucose.c
+++ b/glucose/glucose.c
@@ -132,21 +132,36 @@ glucoseCreateScreenResources(ScreenPtr p
pScreenPriv->rootDrawable = pScreenPriv->screen->createDrawable(pScreenPriv->screen, (DrawablePtr)pPixmap, pPixmap->drawable.id, modes);
- if (!pScreenPriv->rootDrawable)
+ if (!pScreenPriv->rootDrawable) {
+ xf86DrvMsg(pScreen->myNum, X_WARNING,
+ "Glucose - creating root drawable failed\n");
return FALSE;
+ }
pScreenPriv->rootContext = pScreenPriv->screen->createContext(pScreenPriv->screen, modes, NULL);
- if (!pScreenPriv->rootContext)
+ if (!pScreenPriv->rootContext) {
+ xf86DrvMsg(pScreen->myNum, X_WARNING,
+ "Glucose - creating root context failed\n");
+ pScreenPriv->rootDrawable->destroy(pScreenPriv->rootDrawable);
+ pScreenPriv->rootDrawable = NULL;
return FALSE;
+ }
pScreenPriv->rootContext->drawPriv =
pScreenPriv->rootContext->readPriv = pScreenPriv->rootDrawable;
__glXleaveServer();
err = pScreenPriv->rootContext->makeCurrent(pScreenPriv->rootContext);
- if (!err)
- ErrorF("makecurrent failed, err is %d\n",err);
+ if (!err) {
+ xf86DrvMsg(pScreen->myNum, X_WARNING,
+ "Glucose makeCurrent failed, err is %d\n",err);
+ pScreenPriv->rootContext->destroy(pScreenPriv->rootContext);
+ pScreenPriv->rootContext = NULL;
+ pScreenPriv->rootDrawable->destroy(pScreenPriv->rootDrawable);
+ pScreenPriv->rootDrawable = NULL;
+ return FALSE;
+ }
format = glucoseInitOutput(pScreenPriv->screen);
More information about the xorg-commit
mailing list