diff --git a/lib/font.c b/lib/font.c
index 2b9e94f..cbf2e39 100644
--- a/lib/font.c
+++ b/lib/font.c
@@ -83,8 +83,9 @@ dia_font_check_for_font(int font)
   if (!loaded) {
     message_error(_("Can't load font %s.\n"), dia_font_get_family(check));
   } else {
-    g_object_unref (loaded);
+    g_object_unref(loaded);
   }
+  dia_font_unref(check);
 }
 
 void
