Avoid crashing on non-initialized debug info.
diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c
index d91cec2..8354bef 100644
--- a/dlls/ntdll/debugtools.c
+++ b/dlls/ntdll/debugtools.c
@@ -170,7 +170,7 @@
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 @@
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_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 @@
}
/* save current position to restore it on exception */
- info = NtCurrentTeb()->debug_info;
old_pos = info->str_pos;
__TRY
{