From a21fe34596b7456d896dab4763f1ae97153846aa Mon Sep 17 00:00:00 2001 From: Michael Karcher Date: Sun, 15 Aug 1999 14:16:42 +0000 Subject: [PATCH] Make sure we have a dgroup before patching prologs. --- loader/ne/segment.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/loader/ne/segment.c b/loader/ne/segment.c index 4d53b339bde..f800cac82d5 100644 --- a/loader/ne/segment.c +++ b/loader/ne/segment.c @@ -452,13 +452,15 @@ void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum) TRACE_(module)("(%d);\n", segnum); if (pSegTable[segnum-1].flags & NE_SEGFLAGS_DATA) -{ + { pSegTable[segnum-1].flags |= NE_SEGFLAGS_LOADED; return; } - if (!(dgroup = SEL(pSegTable[pModule->dgroup-1].hSeg))) - return; + if (!pModule->dgroup) return; + + if (!(dgroup = SEL(pSegTable[pModule->dgroup-1].hSeg))) return; + pSeg = PTR_SEG_OFF_TO_LIN(sel, 0); bundle = (ET_BUNDLE *)((BYTE *)pModule+pModule->entry_table);