diff --git a/src/hardware/hw_bsp.c b/src/hardware/hw_bsp.c
index 271d832a49a262111d2484bed5a4d145e5408299..c75d0b485d63d63f4540779d3ee9fcda7ea2092d 100644
--- a/src/hardware/hw_bsp.c
+++ b/src/hardware/hw_bsp.c
@@ -387,7 +387,7 @@ static void SplitPoly (fdivline_t *bsp,         //splitting parametric line
 		*backpoly = HWR_AllocPoly(2 + nptback);
 	else
 		*backpoly = NULL;
-	if (nptfront)
+	if (nptfront > 0)
 		*frontpoly = HWR_AllocPoly(2 + nptfront);
 	else
 		*frontpoly = NULL;