diff --git a/ChangeLog b/ChangeLog
index 2aa08d10d8a33d28a91b4247e055e2c457bc50d6..29158f861ab25da7bb3a825114d04225f650e684 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-10-30  Per Cederqvist  <ceder@sedesopim.lysator.liu.se>
 
+	Fixed crash in distribute-tasks.
+
+	* distribute-tasks (read_new_tasks): Added missing global
+	declaration.
+
 	Provide a makefile that can install the system.
 	
 	* Makefile: New file
diff --git a/distribute-tasks b/distribute-tasks
index 1e419a9be399aa3b33a2071c199b35cfbdf13eb3..6b41b483cd4b1b5ed649baafa09d9576b78d9eb9 100755
--- a/distribute-tasks
+++ b/distribute-tasks
@@ -81,6 +81,8 @@ def read_tasks(lysrdiffpart):
 	ordered_tasks.append(info)
 
 def read_new_tasks():
+    global ordered_tasks
+
     new_found = False
     new_tasks = []
     for line in file("/nobackup/backup.lysator/var/tasks"):