From 6ca71d39b25b1ba8ed055dfd90fec13ecb0aa255 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 21 Oct 2001 15:04:04 +0000 Subject: [PATCH] Avoid crashing on non-initialized debug info. --- dlls/ntdll/debugtools.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index d91cec2749b..8354bef38c3 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -170,7 +170,7 @@ inline static char *put_string_w( const WCHAR *src, int n ) const char *wine_dbgstr_an( const char *src, int n ) { char *res, *old_pos; - struct debug_info *info; + struct debug_info *info = get_info(); if (!HIWORD(src)) { @@ -180,7 +180,6 @@ const char *wine_dbgstr_an( const char *src, int n ) return res; } /* save current position to restore it on exception */ - info = NtCurrentTeb()->debug_info; old_pos = info->str_pos; __TRY { @@ -201,7 +200,7 @@ const char *wine_dbgstr_an( const char *src, int n ) const char *wine_dbgstr_wn( const WCHAR *src, int n ) { char *res, *old_pos; - struct debug_info *info; + struct debug_info *info = get_info(); if (!HIWORD(src)) { @@ -212,7 +211,6 @@ const char *wine_dbgstr_wn( const WCHAR *src, int n ) } /* save current position to restore it on exception */ - info = NtCurrentTeb()->debug_info; old_pos = info->str_pos; __TRY {