gnome-games r7571 - in trunk/glchess: . src/lib/gtkui
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7571 - in trunk/glchess: . src/lib/gtkui
- Date: Sat, 5 Apr 2008 03:16:57 +0100 (BST)
Author: rancell
Date: Sat Apr 5 03:16:57 2008
New Revision: 7571
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7571&view=rev
Log:
Abort 3D render if widget_get_gl_context() returns None (Bug #512068)
Modified:
trunk/glchess/ChangeLog
trunk/glchess/src/lib/gtkui/chessview.py
Modified: trunk/glchess/src/lib/gtkui/chessview.py
==============================================================================
--- trunk/glchess/src/lib/gtkui/chessview.py (original)
+++ trunk/glchess/src/lib/gtkui/chessview.py Sat Apr 5 03:16:57 2008
@@ -110,8 +110,12 @@
glDrawable = gtk.gtkgl.widget_get_gl_drawable(self)
glContext = gtk.gtkgl.widget_get_gl_context(self)
- # OpenGL begin.
- if glDrawable is None or not glDrawable.gl_begin(glContext):
+ # Check were able to get context
+ if glDrawable is None or glContext is None:
+ return
+
+ # OpenGL begin (can fail)
+ if not glDrawable.gl_begin(glContext):
return
self.__glDrawable = glDrawable
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]