summaryrefslogtreecommitdiff
path: root/ptr_chck.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptr_chck.c')
-rw-r--r--ptr_chck.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ptr_chck.c b/ptr_chck.c
index a4298a81..584d6b87 100644
--- a/ptr_chck.c
+++ b/ptr_chck.c
@@ -212,9 +212,10 @@ GC_API void * GC_CALL GC_is_visible(void *p)
/* Else do it again correctly: */
# if defined(DYNAMIC_LOADING) || defined(MSWIN32) \
|| defined(MSWINCE) || defined(CYGWIN32) || defined(PCR)
- GC_register_dynamic_libraries();
- if (GC_is_static_root(p))
- return(p);
+ if (!GC_no_dls) {
+ GC_register_dynamic_libraries();
+ if (GC_is_static_root(p)) return p;
+ }
# endif
goto fail;
} else {