[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA-dev: [PATCH] gschem: Fix segfault when trying to write animage.
The change to split out gschem TOPLEVEL variables, left some code
which tries to copy the TOPLEVEL variables from the old data
structure. This caused a segfalut to happen on my system.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
gschem/src/x_image.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gschem/src/x_image.c b/gschem/src/x_image.c
index 260911c..aad3eb5 100644
--- a/gschem/src/x_image.c
+++ b/gschem/src/x_image.c
@@ -649,7 +649,7 @@ GdkPixbuf *x_image_get_pixbuf (GSCHEM_TOPLEVEL *w_current)
/* Do a copy of the w_current struct and work with it */
memcpy(&new_w_current, w_current, sizeof(GSCHEM_TOPLEVEL));
/* Do a copy of the toplevel struct and work with it */
- memcpy(&toplevel, w_current, sizeof(TOPLEVEL));
+ memcpy(&toplevel, w_current->toplevel, sizeof(TOPLEVEL));
new_w_current.toplevel = &toplevel;
--
1.5.3.4.498.g9c514
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev