summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-05-22 11:46:19 +0200
committerportix <portix@gmx.net>2013-05-22 11:46:19 +0200
commit9dd2d2fe9d41ea81b7896e1328975fdf42edd856 (patch)
tree0c6c41757a62740ece8b634507db7622e0777801
parent48a3718d087dcf72bf913f9489214c3db217691d (diff)
downloaddwb-9dd2d2fe9d41ea81b7896e1328975fdf42edd856.zip
Fixing segfault in changeMode signal if no tab has been opened
-rw-r--r--src/dwb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dwb.c b/src/dwb.c
index ca59c412..f47f696d 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -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;
}