diff options
author | portix <portix@gmx.net> | 2012-01-19 09:46:31 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-01-19 09:46:31 +0100 |
commit | d93f04c7b9bec2578255ee0c9107bfe331e0c620 (patch) | |
tree | 8ad9f9d835ef01bc5591c1b6120b6e8a63efa7f8 /src/commands.c | |
parent | 8e9e2f074ee10f411f54848f390475b5480c572e (diff) | |
download | dwb-d93f04c7b9bec2578255ee0c9107bfe331e0c620.zip |
Fixing redundant checks for NULL reported by cppcheck
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 5 |
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; |