summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlay/mgdb/gdb/winnt-nat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c
index 3637c4e..80641c2 100644
--- a/overlay/mgdb/gdb/winnt-nat.c
+++ b/overlay/mgdb/gdb/winnt-nat.c
@@ -155,6 +155,9 @@ static struct winnt_process * winnt_process_record(pid_t pid)
winnt_process * pdbg;
winnt_process * pcap;
+ if (!pid)
+ return 0;
+
for (pdbg=plist, pcap=&plist[pcnt]; pdbg<pcap; pdbg++)
if (pdbg->pid == pid)
return pdbg;