projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
03593f5
)
Coverity #943: Avoid a NULL chase.
author
Adam Jackson
<ajax@freedesktop.org>
Fri, 7 Apr 2006 00:05:50 +0000
(
00:05
+0000)
committer
Adam Jackson
<ajax@freedesktop.org>
Fri, 7 Apr 2006 00:05:50 +0000
(
00:05
+0000)
src/glx/x11/glx_pbuffer.c
patch
|
blob
|
history
diff --git
a/src/glx/x11/glx_pbuffer.c
b/src/glx/x11/glx_pbuffer.c
index
afdf710
..
5997158
100644
(file)
--- a/
src/glx/x11/glx_pbuffer.c
+++ b/
src/glx/x11/glx_pbuffer.c
@@
-191,20
+191,23
@@
static int
GetDrawableAttribute( Display *dpy, GLXDrawable drawable,
int attribute, unsigned int *value )
{
GetDrawableAttribute( Display *dpy, GLXDrawable drawable,
int attribute, unsigned int *value )
{
- __GLXdisplayPrivate *priv
= __glXInitialize(dpy)
;
+ __GLXdisplayPrivate *priv;
xGLXGetDrawableAttributesReply reply;
CARD32 * data;
unsigned int length;
unsigned int i;
unsigned int num_attributes;
xGLXGetDrawableAttributesReply reply;
CARD32 * data;
unsigned int length;
unsigned int i;
unsigned int num_attributes;
+
+ if ( (dpy == NULL) || (drawable == 0) ) {
+ return 0;
+ }
+
+ priv = __glXInitialize(dpy);
GLboolean use_glx_1_3 = ((priv->majorVersion > 1)
|| (priv->minorVersion >= 3));
*value = 0;
GLboolean use_glx_1_3 = ((priv->majorVersion > 1)
|| (priv->minorVersion >= 3));
*value = 0;
- if ( (dpy == NULL) || (drawable == 0) ) {
- return 0;
- }
LockDisplay(dpy);
LockDisplay(dpy);