projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08077f
)
Fixed segfault of not shortcut default is set.
author
Daniel Carl
<danielcarl@gmx.de>
Wed, 12 Mar 2014 22:41:13 +0000
(23:41 +0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Wed, 12 Mar 2014 22:41:13 +0000
(23:41 +0100)
src/ex.c
patch
|
blob
|
history
src/shortcut.c
patch
|
blob
|
history
diff --git
a/src/ex.c
b/src/ex.c
index
80df73a
..
e4c8306
100644
(file)
--- a/
src/ex.c
+++ b/
src/ex.c
@@
-879,7
+879,7
@@
static gboolean ex_shortcut(const ExArg *arg)
{
char *p;
- /* TODO allow to set shortcu
st
with set command like ':set
+ /* TODO allow to set shortcu
ts
with set command like ':set
* shortcut[name]=http://donain.tld/?q=$0' */
switch (arg->code) {
case EX_SCA:
diff --git
a/src/shortcut.c
b/src/shortcut.c
index
edca08d
..
1d746e9
100644
(file)
--- a/
src/shortcut.c
+++ b/
src/shortcut.c
@@
-145,7
+145,7
@@
static const char *shortcut_lookup(const char *string, const char **query)
}
}
- if (!uri && (uri = g_hash_table_lookup(shortcuts, default_key))) {
+ if (!uri &&
default_key &&
(uri = g_hash_table_lookup(shortcuts, default_key))) {
*query = string;
}