X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/a8747834bb7d56ef1e57be5404824d6a638ba2d4..0c207c37488b1f548caf9fc4f392bac16094c227:/server/trackdb.c diff --git a/server/trackdb.c b/server/trackdb.c index ae3a7e2..6f89f2a 100644 --- a/server/trackdb.c +++ b/server/trackdb.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder - * Copyright (C) 2005, 2006 Richard Kettlewell + * Copyright (C) 2005, 2006, 2007 Richard Kettlewell * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -581,9 +581,15 @@ static int compute_alias(char **aliasp, const char *s = config->alias, *t, *expansion, *part; int c, used_db = 0, slash_prefix, err; struct kvp *at; + const char *const root = find_track_root(track); + if(!root) { + /* Bodge for tracks with no root */ + *aliasp = 0; + return 0; + } dynstr_init(&d); - dynstr_append_string(&d, find_track_root(track)); + dynstr_append_string(&d, root); while((c = (unsigned char)*s++)) { if(c != '{') { dynstr_append(&d, c);