Skip to content
Browse files

Handle empty acc bindings correctly

  • Loading branch information...
1 parent 0890ae0 commit adaf9c78290f78cba960326c85ca96e046299a00 Alexander Stigsen committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/Accelerators.cpp
View
10 src/Accelerators.cpp
@@ -279,10 +279,12 @@ void Accelerators::ReadCustomShortcuts() {
wxJSONValue bindings = jsonRoot[wxT("bindings")];
m_customBindings.clear();
- wxArrayString keys = bindings.GetMemberNames();
- for(unsigned int c = 0; c < keys.size(); c++) {
- wxString key = keys[c];
- m_customBindings[normalize(key)] = bindings[key].AsString();
+ if (bindings.IsObject()) {
+ const wxArrayString keys = bindings.GetMemberNames();
+ for(unsigned int c = 0; c < keys.size(); c++) {
+ const wxString key = keys[c];
+ m_customBindings[normalize(key)] = bindings[key].AsString();
+ }
}
}

1 comment on commit adaf9c7

@rdp

Any chance of getting this thing fully open sourced, since "It's dead jim"?

Please sign in to comment.
Something went wrong with that request. Please try again.