#include <gio/gio.h>

int main(void)
{
  GSettings *settings;

  g_type_init();

  settings = g_settings_new ("org.gnome.desktop.background");
  g_settings_delay (settings);

  g_settings_set_string (settings, "primary-color", g_strdup ("#000000000000"));
  // with the next line commented out, no issue appears anymore
  g_settings_set_string (settings, "secondary-color", g_strdup ("#000000000000"));
  g_settings_apply (settings);

  g_main_loop_run(g_main_loop_new(NULL, FALSE));
  return 0;
}
