aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Gradient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gradient.cs')
-rw-r--r--src/Gradient.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Gradient.cs b/src/Gradient.cs
index 0806e885..2630c42a 100644
--- a/src/Gradient.cs
+++ b/src/Gradient.cs
@@ -96,8 +96,11 @@ namespace Crow
throw new NotImplementedException ();
}
- foreach (ColorStop cs in Stops)
+ foreach (ColorStop cs in Stops) {
+ if (cs == null)
+ continue;
grad.AddColorStop (cs.Offset, cs.Color);
+ }
ctx.SetSource (grad);
grad.Dispose ();