summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/debug.cc')
-rw-r--r--winsup/cygwin/debug.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
index 4f1d6dfa3..05b53cf33 100644
--- a/winsup/cygwin/debug.cc
+++ b/winsup/cygwin/debug.cc
@@ -112,6 +112,9 @@ add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
handle_list *hl;
lock_debug here;
+ if (!cygheap)
+ return;
+
if ((hl = find_handle (h)))
{
hl = hl->next;
@@ -172,6 +175,9 @@ mark_closed (const char *func, int ln, HANDLE h, const char *name, bool force)
handle_list *hl;
lock_debug here;
+ if (!cygheap)
+ return true;
+
if ((hl = find_handle (h)) && !force)
{
hl = hl->next;