From 3a495d5492def362b21378565aef91f15c9325a6 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 17 Aug 2006 11:36:46 +0000 Subject: [PATCH] fix possible segfault (on refcount wrap) --- lib/gdi/grc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/gdi/grc.cpp b/lib/gdi/grc.cpp index ef75aace..67f0059f 100644 --- a/lib/gdi/grc.cpp +++ b/lib/gdi/grc.cpp @@ -115,7 +115,11 @@ void *gRC::thread() else if (o.opcode==gOpcode::notify) need_notify = 1; else + { o.dc->exec(&o); + // o.dc is a gDC* filled with grabref... so we must release it here + o.dc->Release(); + } } else { -- 2.30.2