Fixed g_source_attach() error checking.