--- gtkcurve.c	2003-04-10 12:58:44.000000000 -0400
+++ gtkcurve.c.fixed	2003-04-10 13:01:21.000000000 -0400
@@ -684,7 +684,16 @@
       width  = GTK_WIDGET (c)->allocation.width - RADIUS * 2;
       height = GTK_WIDGET (c)->allocation.height - RADIUS * 2;
 
-      if (new_type == GTK_CURVE_TYPE_FREE)
+      # errors happen down lower if we try to do 
+      # anything but set the curve type before realization
+      # beyond that the other stuff in here doesn't need doing
+      # if we aren't realized yet.
+      if ( !GTK_WIDGET_REALIZED(GTK_WIDGET(c)) )
+        {
+          c->curve_type = new_type;
+	  return;
+        }
+      else if (new_type == GTK_CURVE_TYPE_FREE)
 	{
 	  gtk_curve_interpolate (c, width, height);
 	  c->curve_type = new_type;
