Merge branch 'master' of git://cadel.mutabah.net/acess2
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / wm_hotkeys.c
index bdea09c..00041a9 100644 (file)
@@ -41,9 +41,7 @@ void WM_Hotkey_Register(int nKeys, uint32_t *Keys, const char *ActionName)
        strcpy((char*)h->Target, ActionName);
        memcpy(h->Keys, Keys, nKeys * sizeof(uint32_t));
        
-       h->Next = NULL;
-       if( gpWM_Hotkeys )
-               gpWM_Hotkeys->Next = h;
+       h->Next = gpWM_Hotkeys;
        gpWM_Hotkeys = h;
 }
 
@@ -64,6 +62,7 @@ void WM_Hotkey_RegisterAction(const char *ActionName, tWindow *Target, uint16_t
        strcpy((char*)t->Name, ActionName);
        t->Window = Target;
        t->Index = Index;
+       t->Next = NULL;
 
        // TODO: Register to be informed when the window dies/closes?
 

UCC git Repository :: git.ucc.asn.au