--- shape.c.~1.10.8.1.~	2005-02-22 08:03:57.000000000 -0500
+++ shape.c	2005-10-19 16:15:17.833528000 -0400
@@ -42,11 +42,19 @@
 {
   int i;
   int last_cluster = -1;
-  
+  gint num_glyphs = 1;
+  gboolean use_null_glyph = TRUE;
+
   if (analysis->shape_engine)
-    _pango_engine_shape_shape (analysis->shape_engine, analysis->font,
-			       text, length, analysis, glyphs);
-  else
+    {
+      _pango_engine_shape_shape (analysis->shape_engine, analysis->font,
+				 text, length, analysis, glyphs);
+      /* For the sake of g_return_if_fail below.  */
+      num_glyphs = glyphs->num_glyphs;
+      use_null_glyph = (num_glyphs == 0);
+    }
+
+  if (use_null_glyph)
     {
       pango_glyph_string_set_size (glyphs, 1);
 
@@ -72,5 +80,5 @@
 	glyphs->glyphs[i].attr.is_cluster_start = FALSE;
     }
 	    
-  g_assert (glyphs->num_glyphs > 0);
+  g_return_if_fail (num_glyphs > 0);
 }
