I've seen a real-world app die because of this.

-Nathan
>From 3e3ccda40b5eb51c0dc6f949f42cbdee26233169 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nk...@opentext.com>
Date: Fri, 18 Feb 2011 14:16:55 -0500
Subject: [PATCH] Don't die when NULL id passed to glXDestroyContext

The check was useless for keeping internal state consistency
anyway, since the ctx id is fed directly from the user.
---
 rr/faker-ctxhash.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/rr/faker-ctxhash.h b/rr/faker-ctxhash.h
index d342c73..97f95ed 100644
--- a/rr/faker-ctxhash.h
+++ b/rr/faker-ctxhash.h
@@ -70,8 +70,7 @@ class ctxhash : public _ctxhash
 
 		void remove(GLXContext ctx)
 		{
-			if(!ctx) _throw("Invalid argument");
-			_ctxhash::remove(ctx, NULL);
+			if(ctx) _ctxhash::remove(ctx, NULL);
 		}
 
 	private:
-- 
1.6.3.3

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users

Reply via email to