Bug 627302 - Don't violate COM rules by forgetting to check the return value. r+a=jst
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 25 Jan 2011 15:07:07 -0800
changeset 61452 68931522981d42fd4ca3b8b5f8447d5e73cc52fe
parent 61451 c098265c18e28ea1ff0cb82ec9be7ce6a4366014
child 61453 a2825fbe23e39d34451769d44ab0cf2e3a883253
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
bugs627302
milestone2.0b10pre
Bug 627302 - Don't violate COM rules by forgetting to check the return value. r+a=jst
content/svg/content/src/nsSVGMarkerElement.cpp
--- a/content/svg/content/src/nsSVGMarkerElement.cpp
+++ b/content/svg/content/src/nsSVGMarkerElement.cpp
@@ -215,17 +215,18 @@ NS_IMETHODIMP nsSVGMarkerElement::SetOri
 
 /* void setOrientToAngle (in nsIDOMSVGAngle angle); */
 NS_IMETHODIMP nsSVGMarkerElement::SetOrientToAngle(nsIDOMSVGAngle *angle)
 {
   if (!angle)
     return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
 
   float f;
-  angle->GetValue(&f);
+  nsresult rv = angle->GetValue(&f);
+  NS_ENSURE_SUCCESS(rv, rv);
   NS_ENSURE_FINITE(f, NS_ERROR_DOM_SVG_WRONG_TYPE_ERR);
   mAngleAttributes[ORIENT].SetBaseValue(f, this);
 
   return NS_OK;
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods