
4 Jul
2005
4 Jul
'05
5:19 a.m.
On Sat, Jul 02, 2005 at 12:18:52PM +0200, Ralf Stephan wrote:
Also the order of nulling+freeing is reversed to make sure there is no race condition (not sure if necessary but hey).
Surely this is unnecessary unless we are multi-threaded, or some other asynchronous event (signal handler?) can access gr->color here.
If either of those "unless" conditions is true, then I'd really like to be aware of it!
Otherwise, I'd like to reverse the below hunk, for readability.
pjrm.
--- inkscape-20050701-2000/src/sp-gradient.cpp 2005-07-02 05:00:25.000000000 +0200 +++ inkscape-patched/src/sp-gradient.cpp 2005-07-02 12:00:23.999286048 +0200 @@ -774,9 +774,10 @@ { bool ret = false;
- if (gr->color) {
g_free(gr->color);
- if (gr->color != NULL) {
void* tmp = gr->color; gr->color = NULL;
}g_free(tmp); ret = true;