On Die, 2012-03-20 at 11:49 +0800, Wang YanQing wrote: > createDrawable may return NULL value, we should check it, or it will > make a segment failed. > > Signed-off-by: Wang YanQing <udkni...@gmail.com> > --- > src/glx/dri_common.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c > index e7dba5a..6122d32 100644 > --- a/src/glx/dri_common.c > +++ b/src/glx/dri_common.c > @@ -376,6 +376,12 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable > glxDrawable) > > pdraw = psc->driScreen->createDrawable(psc, glxDrawable, > glxDrawable, gc->config); > + > + if (pdraw == NULL) { > + fprintf(stderr, "failed to create drawable\n"); > + return NULL; > + } > +
Please use one of the *MessageF() functions instead of fprintf directly. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev