--- gio/gsettingsschema.c.orig	2014-02-01 15:19:55.000000000 -0500
+++ gio/gsettingsschema.c	2014-02-23 15:33:03.727599178 -0500
@@ -200,7 +200,8 @@
 GSettingsSchemaSource *
 g_settings_schema_source_ref (GSettingsSchemaSource *source)
 {
-  g_atomic_int_inc (&source->ref_count);
+  if (source)
+    g_atomic_int_inc (&source->ref_count);
 
   return source;
 }
@@ -216,6 +217,9 @@
 void
 g_settings_schema_source_unref (GSettingsSchemaSource *source)
 {
+  if (!source)
+    return;
+
   if (g_atomic_int_dec_and_test (&source->ref_count))
     {
       if (source == schema_sources)
