diff --git a/src/graph/helper.cc b/src/graph/helper.cc
index 1dd96373cd357d20312635dba1e0dc81423b65dd..f898acb89fadea96921531326acdef33ff6f9660 100644
--- a/src/graph/helper.cc
+++ b/src/graph/helper.cc
@@ -1043,6 +1043,9 @@ namespace hpp {
 	    const std::vector <Rule>& rules,
             const value_type& prePlaceWidth)
         {
+          if (ps->graphs.has (graphName))
+            throw std::invalid_argument ("A graph named " + graphName + " already exists.");
+
           const Device& robot = *(ps->robot ());
           const pinocchio::Model& model = robot.model();
           Grippers_t grippers (griNames.size());