fix possible segfault (on refcount wrap)
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 17 Aug 2006 11:36:46 +0000 (11:36 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 17 Aug 2006 11:36:46 +0000 (11:36 +0000)
lib/gdi/grc.cpp

index ef75aacea6e33f0ac42ae4cd293bf57cda0356da..67f0059face0513907d943e0dfc525c8b1e9b4e7 100644 (file)
@@ -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
                {