Fixed debug routines to work before the process heap is created.

This commit is contained in:
Alexandre Julliard 2000-12-20 18:43:42 +00:00
parent 014a8bb1e3
commit 58c58c5445
1 changed files with 6 additions and 2 deletions

View File

@ -32,10 +32,14 @@ static inline struct debug_info *get_info(void)
struct debug_info *info = NtCurrentTeb()->debug_info;
if (!info)
{
if (!tmp.str_pos)
{
tmp.str_pos = tmp.strings;
tmp.out_pos = tmp.output;
}
if (!GetProcessHeap()) return &tmp;
/* setup the temp structure in case HeapAlloc wants to print something */
NtCurrentTeb()->debug_info = &tmp;
tmp.str_pos = tmp.strings;
tmp.out_pos = tmp.output;
info = HeapAlloc( GetProcessHeap(), 0, sizeof(*info) );
info->str_pos = info->strings;
info->out_pos = info->output;