aboutsummaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-08-17 22:22:17 +0200
committerThomas White <taw@bitwiz.org.uk>2013-08-17 22:22:17 +0200
commit4a164b5f3020b75c55a26ea20f8ed6fcabfaa66d (patch)
tree4401b08633f1a7009c58c200dd04ab7e335f9b26 /src/frame.c
parent8d341bdb00df96e549f0cadc64c25cfa4f09294a (diff)
Avoid strdup(NULL)
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 3e207cd..bc0f744 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -189,7 +189,11 @@ static void parse_options(struct frame *fr, const char *opth, StyleSheet *ss)
int i;
size_t len;
size_t start;
- char *opt = strdup(opth);
+ char *opt;
+
+ if ( opth == NULL ) return;
+
+ opt = strdup(opth);
len = strlen(opt);
start = 0;