Index: /trunk/psLib/src/math/psEllipse.c
===================================================================
--- /trunk/psLib/src/math/psEllipse.c	(revision 13801)
+++ /trunk/psLib/src/math/psEllipse.c	(revision 13802)
@@ -46,4 +46,5 @@
 
 // ellipse rotation (major, minor, theta) -> (x2, y2, xy)
+// XXXX handle case where e0 < LIMIT
 psErrorCode psEllipsePolToAxes(const psEllipsePol pol,
 			       const float minMinorAxis,
@@ -63,10 +64,18 @@
 
     float LIMIT = PS_SQR(minMinorAxis);
-    if (2.0*(pol.e0 - ds) < LIMIT) {
-	axes->major = sqrt(pol.e0 - LIMIT);
-	axes->minor = sqrt(LIMIT);
+    if (pol.e0 < LIMIT) {
+	// if e0 is too small, we are really out of luck
+	axes->major = minMinorAxis;
+	axes->minor = minMinorAxis;
     } else {
-	axes->major = sqrt(0.5*(pol.e0 + ds));
-	axes->minor = sqrt(0.5*(pol.e0 - ds));
+	if (2.0*(pol.e0 - ds) < LIMIT) {
+	    // if e0 - ds is too small, saturate the minor axis at minMinorAxis
+	    axes->major = sqrt(pol.e0 - LIMIT);
+	    axes->minor = sqrt(LIMIT);
+	} else {
+	    // normal values for e0 & ds
+	    axes->major = sqrt(0.5*(pol.e0 + ds));
+	    axes->minor = sqrt(0.5*(pol.e0 - ds));
+	}
     }
 
