Bugfix: check symbol for NULL in binding json dump
When dumping a binding, as is done during the binding event, check symbol for NULL. If it is, dump json null. This prevents a crash when running a binding that was configured with bindcode. fixes #1379
This commit is contained in:
committed by
Michael Stapelberg
parent
3e841ac5b6
commit
6ba7728136
@ -160,7 +160,10 @@ static void dump_binding(yajl_gen gen, Binding *bind) {
|
||||
ystr((const char*)(bind->input_type == B_KEYBOARD ? "keyboard" : "mouse"));
|
||||
|
||||
ystr("symbol");
|
||||
ystr(bind->symbol);
|
||||
if (bind->symbol == NULL)
|
||||
y(null);
|
||||
else
|
||||
ystr(bind->symbol);
|
||||
|
||||
ystr("command");
|
||||
ystr(bind->command);
|
||||
|
Reference in New Issue
Block a user