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

gEDA-cvs: pcb.git: branch: master updated (498e5dd36d279a16f2eff27b69967c6aa9f7c31f)



The branch, master has been updated
       via  498e5dd36d279a16f2eff27b69967c6aa9f7c31f (commit)
      from  ccb2e68847996fb65fac0041be6b2b91501e62cb (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
=========

 src/move.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit 498e5dd36d279a16f2eff27b69967c6aa9f7c31f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    move.c: Adjust the object counters when moving objects between layers
    
    This fixes a crash introduced by
    commit 2ce35292b9e96da38cb56878005aba20891689eb,
    "Convert board objects to GLists of g_slice allocated memory"
    
    It doesn't fix entirity of the defect reported in that bug, but
    it restores the prior behaviour where PCB would hang, not segfault.
    
    Reported-by: Colin Bennett <colin@xxxxxxxxxxx>
    
    Affects-bug: lp-783640

:100644 100644 6ce043a... de1e2e7... M	src/move.c

=========
 Changes
=========

commit 498e5dd36d279a16f2eff27b69967c6aa9f7c31f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    move.c: Adjust the object counters when moving objects between layers
    
    This fixes a crash introduced by
    commit 2ce35292b9e96da38cb56878005aba20891689eb,
    "Convert board objects to GLists of g_slice allocated memory"
    
    It doesn't fix entirity of the defect reported in that bug, but
    it restores the prior behaviour where PCB would hang, not segfault.
    
    Reported-by: Colin Bennett <colin@xxxxxxxxxxx>
    
    Affects-bug: lp-783640

diff --git a/src/move.c b/src/move.c
index 6ce043a..de1e2e7 100644
--- a/src/move.c
+++ b/src/move.c
@@ -442,7 +442,9 @@ MoveLineToLayerLowLevel (LayerType *Source, LineType *line,
   r_delete_entry (Source->line_tree, (BoxType *)line);
 
   Source->Line = g_list_remove (Source->Line, line);
+  Source->LineN --;
   Destination->Line = g_list_append (Destination->Line, line);
+  Destination->LineN ++;
 
   if (!Destination->line_tree)
     Destination->line_tree = r_create_tree (NULL, 0, 0);
@@ -460,7 +462,9 @@ MoveArcToLayerLowLevel (LayerType *Source, ArcType *arc,
   r_delete_entry (Source->arc_tree, (BoxType *)arc);
 
   Source->Arc = g_list_remove (Source->Arc, arc);
+  Source->ArcN --;
   Destination->Arc = g_list_append (Destination->Arc, arc);
+  Destination->ArcN ++;
 
   if (!Destination->arc_tree)
     Destination->arc_tree = r_create_tree (NULL, 0, 0);
@@ -640,7 +644,9 @@ MoveTextToLayerLowLevel (LayerType *Source, TextType *text,
   r_delete_entry (Source->text_tree, (BoxType *)text);
 
   Source->Text = g_list_remove (Source->Text, text);
+  Source->TextN --;
   Destination->Text = g_list_append (Destination->Text, text);
+  Destination->TextN ++;
 
   if (GetLayerGroupNumberByNumber (solder_silk_layer) ==
       GetLayerGroupNumberByPointer (Destination))
@@ -693,7 +699,9 @@ MovePolygonToLayerLowLevel (LayerType *Source, PolygonType *polygon,
   r_delete_entry (Source->polygon_tree, (BoxType *)polygon);
 
   Source->Polygon = g_list_remove (Source->Polygon, polygon);
+  Source->PolygonN --;
   Destination->Polygon = g_list_append (Destination->Polygon, polygon);
+  Destination->Polygon ++;
 
   if (!Destination->polygon_tree)
     Destination->polygon_tree = r_create_tree (NULL, 0, 0);




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs