Bug fix for solving the crash when deleting the last node from a polyline