#2 √ fixreleased
Matt Stevens

Missing retain in setKeyCombo:

Reported by Matt Stevens | September 27th, 2009 @ 04:49 PM

In SGHotKey.m, setKeyCombo: should call [theKeyCombo retain] on assignment to support non-GC apps.

diff --git a/SGHotKeysLib/SGHotKey.m b/SGHotKeysLib/SGHotKey.m
index 8e7949b..340317e 100644
--- a/SGHotKeysLib/SGHotKey.m
+++ b/SGHotKeysLib/SGHotKey.m
@@ -60,7 +60,7 @@
   if (theKeyCombo == nil)
     theKeyCombo = [SGKeyCombo clearKeyCombo];

-  keyCombo = theKeyCombo;
+  keyCombo = [theKeyCombo retain];
 }

 - (NSString *)description {

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A modernized fork of PTHotKeysLib for Mac OS X Leopard and beyond

Shared Ticket Bins

People watching this ticket