Merge lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214 into lp:compiz-compizconfig-gconf

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: 161
Merged at revision: 161
Proposed branch: lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214
Merge into: lp:compiz-compizconfig-gconf
Diff against target: 27 lines (+9/-2)
1 file modified
src/gconf.c (+9/-2)
To merge this branch: bzr merge lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+97685@code.launchpad.net

Description of the change

Seems to fix lp:953214

I'm not too sure about this API - so I hope someone who understands gtk can review. But I've seen no ill-effects and no more SEG faults.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks quite sane.

review: Approve
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

g_main_loop_is_running(NULL) looks odd to me. The code for that function is:

gboolean
g_main_loop_is_running (GMainLoop *loop)
{
  g_return_val_if_fail (loop != NULL, FALSE);
  g_return_val_if_fail (g_atomic_int_get (&loop->ref_count) > 0, FALSE);

  return loop->is_running;
}

So this statement always returns FALSE. So you've effectively just removed the processEvents(0) call.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/gconf.c'
--- src/gconf.c 2011-09-09 09:33:52 +0000
+++ src/gconf.c 2012-03-15 16:04:24 +0000
@@ -1958,7 +1958,11 @@
1958static Bool1958static Bool
1959finiBackend (CCSContext * context)1959finiBackend (CCSContext * context)
1960{1960{
1961 processEvents (0);1961
1962 if (g_main_loop_is_running(NULL))
1963 {
1964 processEvents (0);
1965 }
19621966
1963 gconf_client_clear_cache (client);1967 gconf_client_clear_cache (client);
1964 finiClient ();1968 finiClient ();
@@ -1972,7 +1976,10 @@
1972 gconf_engine_unref (conf);1976 gconf_engine_unref (conf);
1973 conf = NULL;1977 conf = NULL;
19741978
1975 processEvents (0);1979 if (g_main_loop_is_running(NULL))
1980 {
1981 processEvents (0);
1982 }
1976 return TRUE;1983 return TRUE;
1977}1984}
19781985

Subscribers

People subscribed via source and target branches