vpr: fix segfault caused by cong. cost button and router cost button
diff --git a/vpr/src/draw/draw.cpp b/vpr/src/draw/draw.cpp
index da601ff..94d2fa7 100644
--- a/vpr/src/draw/draw.cpp
+++ b/vpr/src/draw/draw.cpp
@@ -3718,7 +3718,8 @@
         min_cost = std::min(min_cost, rr_costs[inode]);
         max_cost = std::max(max_cost, rr_costs[inode]);
     }
-
+    if(min_cost ==  std::numeric_limits<float>::infinity()) min_cost = 0;
+    if(max_cost == -std::numeric_limits<float>::infinity()) max_cost = 0;
     std::unique_ptr<vtr::ColorMap> cmap = std::make_unique<vtr::PlasmaColorMap>(min_cost, max_cost);
 
     //Draw the nodes in ascending order of value, this ensures high valued nodes