From 98cef98111c4fbbe61b28970ae557d26bc146f37 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 12 Jul 2010 20:19:02 -0400 Subject: [PATCH] Dependencies - depend on self - Prevented tasks from being specified as depending on themselves. --- src/Task.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Task.cpp b/src/Task.cpp index ccf07e789..6b89c02bc 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -470,6 +470,9 @@ void Task::removeAnnotations () //////////////////////////////////////////////////////////////////////////////// void Task::addDependency (int id) { + if (id == this->id) + throw std::string ("A task cannot be dependent on itself."); + std::string uuid = context.tdb.uuid (id); if (uuid == "") {