libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd_src/Win32 glwindow.cpp


From: Gerhard Reitmayr
Subject: [libcvd-members] libcvd/cvd_src/Win32 glwindow.cpp
Date: Fri, 07 Aug 2009 13:19:41 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Gerhard Reitmayr <gerhard>      09/08/07 13:19:41

Modified files:
        cvd_src/Win32  : glwindow.cpp 

Log message:
        fixed crash, if wrong or no render context was present in destructor

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/Win32/glwindow.cpp?cvsroot=libcvd&r1=1.5&r2=1.6

Patches:
Index: glwindow.cpp
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/Win32/glwindow.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- glwindow.cpp        12 Jul 2009 16:20:37 -0000      1.5
+++ glwindow.cpp        7 Aug 2009 13:19:41 -0000       1.6
@@ -215,6 +215,7 @@
 GLWindow::~GLWindow()
 {
        if(state->hRC){
+               if (wglGetCurrentContext() == state->hRC)
                if (!wglMakeCurrent(NULL,NULL)) 
                    throw Exceptions::GLWindow::RuntimeError("Release of DC and 
RC failed.");
                if (!wglDeleteContext(state->hRC))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]