fix bug in .zo writing

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

Merge to 5.1.2
This commit is contained in:
Matthew Flatt 2011-07-20 13:57:52 -06:00
parent 30174b3c81
commit 5b8a892fbb

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