Skip to content

Commit

Permalink
Controls Menu|Fixed: Crash when binding a control
Browse files Browse the repository at this point in the history
Certain items in the controls menu were using a text definition index
as their description, but the grabber wasn't translating them to
a text string.
  • Loading branch information
skyjake committed Mar 14, 2012
1 parent 1edc4a6 commit 72e6d57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/plugins/common/src/m_ctrl.c
Expand Up @@ -793,5 +793,14 @@ int MNBindings_PrivilegedResponder(mn_object_t* obj, event_t* ev)
const char* MNBindings_ControlName(mn_object_t* obj)
{
mndata_bindings_t* binds = (mndata_bindings_t*) obj->_typedata;
assert(obj);
assert(binds);

// Map to a text definition?
if(PTR2INT(binds->text) > 0 && PTR2INT(binds->text) < NUMTEXT)
{
return GET_TXT(PTR2INT(binds->text));
}

return binds->text;
}

0 comments on commit 72e6d57

Please sign in to comment.