- assert (fabs (x2 - (replacement [segment_count - 1].x)) < EPSILON);
- assert (fabs (y2 - (replacement [segment_count - 1].y)) < EPSILON);
+ /* jwz: I don't understand what these assertions are supposed to
+ be detecting, but let's just bail on the fractal instead of
+ crashing. */
+/* assert (fabs (x2 - (replacement [segment_count - 1].x)) < EPSILON);
+ assert (fabs (y2 - (replacement [segment_count - 1].y)) < EPSILON);*/
+ if (fabs (x2 - (replacement [segment_count - 1].x)) >= EPSILON ||
+ fabs (y2 - (replacement [segment_count - 1].y)) >= EPSILON) {
+ free (replacement);
+ return False;
+ }