diff --git a/src/FbTk/Shape.cc b/src/FbTk/Shape.cc index 41c7885a..32745af4 100644 --- a/src/FbTk/Shape.cc +++ b/src/FbTk/Shape.cc @@ -151,7 +151,9 @@ void cleanCorners() { if (nr_shapes == 1) { s_corners.clear(); - } else { + } + + if (nr_shapes > 0) { nr_shapes--; // refcounting } }