diff --git a/src/core/cwuri.c b/src/core/cwuri.c index f649ba44..893e2050 100644 --- a/src/core/cwuri.c +++ b/src/core/cwuri.c @@ -38,9 +38,11 @@ struct uri *cwuri = NULL; * @v uri New working URI, or NULL */ void churi ( struct uri *uri ) { - struct uri *new_uri; + struct uri *new_uri = NULL; + + if ( uri ) + new_uri = resolve_uri ( cwuri, uri ); - new_uri = resolve_uri ( cwuri, uri ); uri_put ( cwuri ); cwuri = new_uri; }