[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_delete.c
User: cnieves
Date: 06/10/22 13:27:58
Modified: . Tag: glist_dev o_delete.c o_misc.c
Log:
* src/o_delete.c: Changed a check to use glib debugging functions.
Don't free objects at the end of o_delete, but free only the list.
* src/o_misc.c: Added a sanity check.
Revision Changes Path
No revision
No revision
1.22.2.2 +5 -7 eda/geda/gaf/gschem/src/o_delete.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_delete.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_delete.c,v
retrieving revision 1.22.2.1
retrieving revision 1.22.2.2
diff -u -b -r1.22.2.1 -r1.22.2.2
--- o_delete.c 21 Oct 2006 22:20:47 -0000 1.22.2.1
+++ o_delete.c 22 Oct 2006 17:27:58 -0000 1.22.2.2
@@ -250,11 +250,7 @@
while(s_current != NULL) {
object = (OBJECT *) s_current->data;
- if (object == NULL) {
- fprintf(stderr,
- _("ERROR: NULL object in o_delete_end!\n"));
- exit(-1);
- }
+ g_assert (object != NULL);
switch(object->type) {
case(OBJ_LINE):
@@ -303,8 +299,10 @@
w_current->inside_action = 0;
- o_selection_unselect_list (w_current,
- &(w_current->page_current->selection_list));
+ /* Objects have been deleted. Free the list, without freeing again
+ the objects */
+ g_list_free(w_current->page_current->selection_list);
+ w_current->page_current->selection_list = NULL;
w_current->page_current->CHANGED=1;
/* no longer needed */
1.35.2.3 +2 -0 eda/geda/gaf/gschem/src/o_misc.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_misc.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_misc.c,v
retrieving revision 1.35.2.2
retrieving revision 1.35.2.3
diff -u -b -r1.35.2.2 -r1.35.2.3
--- o_misc.c 22 Oct 2006 15:37:57 -0000 1.35.2.2
+++ o_misc.c 22 Oct 2006 17:27:58 -0000 1.35.2.3
@@ -1561,6 +1561,8 @@
gboolean is_embedded;
gchar *basename, *clib;
+ g_return_if_fail (o_current != NULL);
+
is_embedded = o_complex_is_embedded (o_current);
/* identify symbol name */
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs