Fix bdftobogl crash on invalid font file.

diff --git a/bogl-font.c b/bogl-font.c
index 5dbcec0..1fc53ad 100644
--- a/bogl-font.c
+++ b/bogl-font.c
@@ -156,13 +156,6 @@ bogl_read_bdf (char *filename)
       return bogl_fail ("%s:%d: font ascent (%d) + descent (%d) must be "
 			"positive", filename, ln, ascent, descent);
 
-    {
-      int i;
-
-      for (i = 0; i < (1<<INDEX_BITS); i++)
-	font_glyphs[i] = NULL;
-    }
-
     return 1;
   }
 
@@ -278,6 +271,13 @@ bogl_read_bdf (char *filename)
 	}
   }
 
+  {
+    int i;
+
+    for (i = 0; i < (1<<INDEX_BITS); i++)
+      font_glyphs[i] = NULL;
+  }
+
   /* Open the file. */
   file = fopen (filename, "r");
   if (file == NULL)
