summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-01-19 09:46:31 +0100
committerportix <portix@gmx.net>2012-01-19 09:46:31 +0100
commitd93f04c7b9bec2578255ee0c9107bfe331e0c620 (patch)
tree8ad9f9d835ef01bc5591c1b6120b6e8a63efa7f8 /src/commands.c
parent8e9e2f074ee10f411f54848f390475b5480c572e (diff)
downloaddwb-d93f04c7b9bec2578255ee0c9107bfe331e0c620.zip
Fixing redundant checks for NULL reported by cppcheck
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands.c b/src/commands.c
index 9a5778ec..67d16d78 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -334,14 +334,15 @@ commands_open(KeyMap *km, Arg *arg) {
if (dwb.state.nv & OPEN_NORMAL)
dwb_set_open_mode(arg->n & ~SET_URL);
- dwb.state.type = arg->i;
+ if (arg)
+ dwb.state.type = arg->i;
if (arg && arg->p && ! (arg->n & SET_URL)) {
dwb_load_uri(NULL, arg->p);
}
else {
entry_focus();
- if (arg->n & SET_URL)
+ if (arg && (arg->n & SET_URL))
entry_set_text(arg->p ? arg->p : CURRENT_URL());
}
return STATUS_OK;