CORRECTED PATCH (was: Re: GWP doesn't compile ... )



On Sat, Dec 19, 1998 at 08:49:01PM -0500, Daniel Burrows scribbled:
>   Well, I commented out the gtk_destroy_widget() call in
> gnome_app_remove_menus() and it _appears_ to work fine.  I've attached a patch
> against gnome-libs/libgnomeui, it's a one-line change again. :-)  I'm concerned
> about eliminating a memory-freeing call, although I can't see how it could be
> segfaulting unless the gtk_container_remove() call destroyed the widget already.
> So I may have introduced a memory leak, but I don't THINK so at the moment..
> I'd feel more secure if someone else confimed that this was kosher though.
> 

  Ack!  Two problems with this message:

  (a) "work fine" is relative, it should say "bring up a window with widgets".
    It still crashes when I do anything. :-)
  (b) I forgot I'd made another local change that got into the other patch.
    This one only changes the problematic function.

-- 
  Daniel Burrows

  Nothing is hopeless.

  PROOF:
(a) Assume the opposite.
(b) If something _is_ hopeless, then its condition can only improve.
(c) If its condition can only improve, then there must be hope for it.
(d) Therefore, nothing is hopeless.  QED.
Index: gnome-app-helper.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-app-helper.c,v
retrieving revision 1.95.2.3
diff -c -r1.95.2.3 gnome-app-helper.c
*** gnome-app-helper.c	1998/12/18 09:58:30	1.95.2.3
--- gnome-app-helper.c	1998/12/20 01:45:04
***************
*** 1372,1378 ****
  		child = GTK_WIDGET(children->data);
  		children = children->next;
  		gtk_container_remove(GTK_CONTAINER(parent), child);
!     gtk_widget_destroy(child);
  		items--;
  	}
  	
--- 1372,1378 ----
  		child = GTK_WIDGET(children->data);
  		children = children->next;
  		gtk_container_remove(GTK_CONTAINER(parent), child);
! //    gtk_widget_destroy(child);
  		items--;
  	}

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]