gEDA-dev: [PATCH] gschem: Fix segfault when trying to write an image.
Robert Fitzsimons
robfitz at 273k.net
Fri Dec 21 09:13:51 EST 2007
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 at 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
More information about the geda-dev
mailing list