chiark / gitweb /
0-track edges cases for the last changes
authorRichard Kettlewell <rjk@greenend.org.uk>
Tue, 2 Oct 2007 09:41:50 +0000 (10:41 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Tue, 2 Oct 2007 09:41:50 +0000 (10:41 +0100)
disobedience/choose.c
disobedience/properties.c

index 2f1543ac50e78e78708e3559035fc9b9b7597bfe..4cdb90f7b01e7721f09b19cad8c3d76d85b84162 100644 (file)
@@ -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 */
index e02bb28cf42aded1fee6b14c281803f27a93921e..e9f61a22e21bcdd3212fa097159882b3896eb75f 100644 (file)
@@ -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) {