Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: eglx.c eobj.c glwin.c x.c Log Message: Fix some potential segv's. =================================================================== RCS file: /cvs/e/e16/e/src/eglx.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- eglx.c 14 Jun 2007 22:38:22 -0000 1.3 +++ eglx.c 24 Jun 2007 16:48:16 -0000 1.4 @@ -288,7 +288,7 @@ { if (!egl.vi) EGlInit(); - return egl.vi->visual; + return (egl.vi) ? egl.vi->visual : NULL; } unsigned int @@ -296,7 +296,7 @@ { if (!egl.vi) EGlInit(); - return egl.vi->depth; + return (egl.vi) ? egl.vi->depth : 0; } #if 0 =================================================================== RCS file: /cvs/e/e16/e/src/eobj.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -3 -r1.94 -r1.95 --- eobj.c 27 May 2007 21:21:32 -0000 1.94 +++ eobj.c 24 Jun 2007 16:48:16 -0000 1.95 @@ -187,6 +187,8 @@ eo->type = type; eo->win = win; eo->shaped = -1; + if (!win) + return; if (type == EOBJ_TYPE_EXT) { =================================================================== RCS file: /cvs/e/e16/e/src/glwin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- glwin.c 15 Jun 2007 20:33:10 -0000 1.1 +++ glwin.c 24 Jun 2007 16:48:16 -0000 1.2 @@ -604,6 +604,8 @@ y = ((win->h - height) / 2); GLWin.eo = EobjWindowCreate(EOBJ_TYPE_GLX, x, y, width, height, 0, "GLwin"); + if (!GLWin.eo) + return -1; win = EobjGetWin(GLWin.eo); EventCallbackRegister(win, 0, GlwinEvent, &GLWin); =================================================================== RCS file: /cvs/e/e16/e/src/x.c,v retrieving revision 1.158 retrieving revision 1.159 diff -u -3 -r1.158 -r1.159 --- x.c 25 May 2007 22:40:47 -0000 1.158 +++ x.c 24 Jun 2007 16:48:16 -0000 1.159 @@ -408,6 +408,9 @@ { Colormap cmap; + if (!vis || depth == 0) + return 0; + cmap = XCreateColormap(disp, VRoot.xwin, vis, AllocNone); return ECreateWindowVDC(parent, x, y, w, h, vis, depth, cmap); @@ -441,7 +444,8 @@ argb = 1; win = ECreateWindowVD(parent, x, y, w, h, EGlGetVisual(), EGlGetDepth()); - win->argb = 1; + if (win) + win->argb = 1; return win; #endif } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs