From: Brian Paul Date: Tue, 2 Apr 2002 23:53:56 +0000 (+0000) Subject: added an error check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db30cc8d0011b3668d2ff371675796a10da80ae2;p=mesa.git added an error check --- diff --git a/progs/xdemos/glxdemo.c b/progs/xdemos/glxdemo.c index c49cd851401..5e7d4497907 100644 --- a/progs/xdemos/glxdemo.c +++ b/progs/xdemos/glxdemo.c @@ -1,4 +1,4 @@ -/* $Id: glxdemo.c,v 1.1 1999/08/19 00:55:43 jtg Exp $ */ +/* $Id: glxdemo.c,v 1.2 2002/04/02 23:53:56 brianp Exp $ */ /* @@ -11,8 +11,11 @@ /* * $Log: glxdemo.c,v $ - * Revision 1.1 1999/08/19 00:55:43 jtg - * Initial revision + * Revision 1.2 2002/04/02 23:53:56 brianp + * added an error check + * + * Revision 1.1.1.1 1999/08/19 00:55:43 jtg + * Imported sources * * Revision 3.0 1998/02/21 02:16:54 brianp * initial rev @@ -90,6 +93,10 @@ static Window make_rgb_db_window( Display *dpy, visinfo->visual, mask, &attr ); ctx = glXCreateContext( dpy, visinfo, NULL, True ); + if (!ctx) { + printf("Error: glXCreateContext failed\n"); + exit(1); + } glXMakeCurrent( dpy, win, ctx );