[Mono-bugs] [Bug 340809] Crash inside Cairo.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 15 11:37:55 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=340809#c8
--- Comment #8 from Sebastien Pouliot <spouliot at novell.com> 2007-11-15 09:37:55 MST ---
Patch for updated hack to cover both bases. I have not been able to make a C
test case that reproduced the first crash (but my system cairo isn't the same
as moonlight).
Index: src/transform.cpp
===================================================================
--- src/transform.cpp (revision 89681)
+++ src/transform.cpp (working copy)
@@ -187,6 +187,9 @@
DependencyProperty* ScaleTransform::ScaleXProperty;
DependencyProperty* ScaleTransform::ScaleYProperty;
+#define IS_NEAR_ZERO(x) (fabs (sx) < NEAR_ZERO)
+#define NEAR_ZERO 0.001
+
void
ScaleTransform::UpdateTransform ()
{
@@ -201,8 +204,9 @@
// being too aggressive at starting animations at time=0 when
// they're supposed to (unset, or 0:0:0 BeginTime)
//
- if (sx == 0.0) sx = 0.00002;
- if (sy == 0.0) sy = 0.00002;
+ // don't just catch 0.0 but other very small values, change limit to
0.001 for #340809
+ if (IS_NEAR_ZERO (sx)) sx = NEAR_ZERO;
+ if (IS_NEAR_ZERO (sy)) sy = NEAR_ZERO;
double cx = scale_transform_get_center_x (this);
double cy = scale_transform_get_center_y (this);
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list