diff options
author | portix <portix@gmx.net> | 2011-12-28 02:09:41 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-12-28 02:09:41 +0100 |
commit | cbc51f69d6cb743886071980664f73c4d804342a (patch) | |
tree | 1acd9614f186d9fbc3ddc29c04778889baf148ca /src/commands.c | |
parent | b21be615c1aed463426ac6cb0d1356d70fa5d3c2 (diff) | |
download | dwb-cbc51f69d6cb743886071980664f73c4d804342a.zip |
Fixing possible segfault in commands_lock_protect
--HG--
branch : experimental
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commands.c b/src/commands.c index 48a13046..e12ddb3d 100644 --- a/src/commands.c +++ b/src/commands.c @@ -869,6 +869,8 @@ commands_toggle_protected(KeyMap *km, Arg *arg) { DwbStatus commands_toggle_lock_protect(KeyMap *km, Arg *arg) { GList *gl = dwb.state.nummod < 0 ? dwb.state.fview : g_list_nth(dwb.state.views, dwb.state.nummod-1); + if (gl == NULL) + return STATUS_ERROR; View *v = VIEW(gl); v->status->lockprotect ^= arg->n; dwb_tab_label_set_text(gl, NULL); |