From 5459347d6b363c0e673b5995d6aff1ce8c456cc3 Mon Sep 17 00:00:00 2001 Message-Id: <5459347d6b363c0e673b5995d6aff1ce8c456cc3.1714912460.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 2 Oct 2007 10:41:50 +0100 Subject: [PATCH] 0-track edges cases for the last changes Organization: Straylight/Edgeware From: Richard Kettlewell --- disobedience/choose.c | 9 +++++---- disobedience/properties.c | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/disobedience/choose.c b/disobedience/choose.c index 2f1543a..4cdb90f 100644 --- a/disobedience/choose.c +++ b/disobedience/choose.c @@ -354,10 +354,11 @@ static void got_files(void *v, int nvec, char **vec) { /* Complicated by the need to resolve aliases. We can save a bit of effort * by re-using cbd though. */ cn->flags &= ~CN_GETTING_FILES; - cn->flags |= CN_RESOLVING_FILES; - cn->pending = nvec; - for(n = 0; n < nvec; ++n) - disorder_eclient_resolve(client, got_resolved_file, vec[n], cbd); + if((cn->pending = nvec)) { + cn->flags |= CN_RESOLVING_FILES; + for(n = 0; n < nvec; ++n) + disorder_eclient_resolve(client, got_resolved_file, vec[n], cbd); + } } /** @brief Called with an alias resolved filename */ diff --git a/disobedience/properties.c b/disobedience/properties.c index e02bb28..e9f61a2 100644 --- a/disobedience/properties.c +++ b/disobedience/properties.c @@ -176,7 +176,10 @@ void properties(int ntracks, const char **tracks) { struct prefdata *f; GtkWidget *hbox, *vbox, *button, *label, *entry, *propagate, *content; GdkPixbuf *pb; - + + /* If no tracks, do nothign */ + if(!ntracks) + return; /* If there is a properties window open then just bring it to the * front. It might not have the right values in... */ if(properties_window) { -- [mdw]