fix bug in .zo writing

The bug showed up in the "racket/embed.rktl" test.

Merge to 5.1.2
(cherry picked from commit 5b8a892fbb)
This commit is contained in:
Matthew Flatt 2011-07-20 13:57:52 -06:00 committed by Eli Barzilay
parent a6e596ba71
commit 196ac13bdd

View File

@ -923,7 +923,10 @@ static Scheme_Object *write_variable(Scheme_Object *obj)
sym = (Scheme_Object *)(SCHEME_VAR_BUCKET(obj))->key;
home = scheme_get_bucket_home((Scheme_Bucket *)obj);
m = home->module;
if (home)
m = home->module;
else
m = NULL;
/* If we get a writeable variable (instead of a module variable),
it must be a reference to a module referenced directly by its