Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle empty acc bindings correctly

  • Loading branch information...
commit adaf9c78290f78cba960326c85ca96e046299a00 1 parent 0890ae0
Alexander Stigsen authored
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();
+ }
}
}

0 comments on commit adaf9c7

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