[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-402-gfe86408)
The branch, master has been updated
via fe8640898cb843b72e1c3cc01ee52c33db736ccf (commit)
from ba14128c0710a12665b07c29e74c00c55993b3d1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/o_move.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit fe8640898cb843b72e1c3cc01ee52c33db736ccf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Dec 20 01:07:17 2008 +0000
gschem: Remove stretched object from stretch list if we delete it
When a stretched object becomes zero length when rubberbanding, we
delete it. We must also remember to delete it from the stretch list,
otherwise it will be referenced later, and could cause a crash.
NB: This isn't the whole story.. the before / after connectivity
lists can still reference the deleted object and cause a crash.
:100644 100644 07294b8... d1fd6d1... M gschem/src/o_move.c
=========
Changes
=========
commit fe8640898cb843b72e1c3cc01ee52c33db736ccf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Dec 20 01:07:17 2008 +0000
gschem: Remove stretched object from stretch list if we delete it
When a stretched object becomes zero length when rubberbanding, we
delete it. We must also remember to delete it from the stretch list,
otherwise it will be referenced later, and could cause a crash.
NB: This isn't the whole story.. the before / after connectivity
lists can still reference the deleted object and cause a crash.
diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c
index 07294b8..d1fd6d1 100644
--- a/gschem/src/o_move.c
+++ b/gschem/src/o_move.c
@@ -501,14 +501,17 @@ void o_move_end_rubberband (GSCHEM_TOPLEVEL *w_current,
GList** connected_objects)
{
TOPLEVEL *toplevel = w_current->toplevel;
- GList *s_iter;
+ GList *s_iter, *s_iter_next;
for (s_iter = toplevel->page_current->stretch_list;
- s_iter != NULL; s_iter = g_list_next (s_iter)) {
+ s_iter != NULL; s_iter = s_iter_next) {
STRETCH *s_current = s_iter->data;
OBJECT *object = s_current->object;
int whichone = s_current->whichone;
+ /* Store this now, since we may delete the current item */
+ s_iter_next = g_list_next (s_iter);
+
if (object->type == OBJ_NET ||
object->type == OBJ_BUS) {
@@ -521,6 +524,8 @@ void o_move_end_rubberband (GSCHEM_TOPLEVEL *w_current,
object->line->y[whichone] += w_dy;
if (o_move_zero_length (object)) {
+ toplevel->page_current->stretch_list =
+ s_stretch_remove (toplevel->page_current->stretch_list, object);
o_delete (w_current, object);
continue;
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs