diff options
author | portix <portix@gmx.net> | 2013-05-22 11:46:19 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-05-22 11:46:19 +0200 |
commit | 9dd2d2fe9d41ea81b7896e1328975fdf42edd856 (patch) | |
tree | 0c6c41757a62740ece8b634507db7622e0777801 | |
parent | 48a3718d087dcf72bf913f9489214c3db217691d (diff) | |
download | dwb-9dd2d2fe9d41ea81b7896e1328975fdf42edd856.zip |
Fixing segfault in changeMode signal if no tab has been opened
-rw-r--r-- | src/dwb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3212,7 +3212,7 @@ dwb_change_mode(Mode mode, ...) * */ char buffer[] = { BASIC_MODES(mode) + 48, 0 }; - ScriptSignal sig = { SCRIPTS_WV(dwb.state.fview), SCRIPTS_SIG_META(buffer, CHANGE_MODE, 0) }; + ScriptSignal sig = { .jsobj = (dwb.state.fview ? CURRENT_VIEW()->script_wv : NULL), SCRIPTS_SIG_META(buffer, CHANGE_MODE, 0) }; if (scripts_emit(&sig)) return STATUS_OK; } |