| Index: nspr/pr/src/md/windows/w95thred.c
|
| diff --git a/nspr/pr/src/md/windows/w95thred.c b/nspr/pr/src/md/windows/w95thred.c
|
| index b2cebaed3de53dafe2584e1ff59a5b2c120a8f16..2741d9482a153a0081e723039dd59416212c309a 100644
|
| --- a/nspr/pr/src/md/windows/w95thred.c
|
| +++ b/nspr/pr/src/md/windows/w95thred.c
|
| @@ -65,7 +65,7 @@ _PR_MD_INIT_THREAD(PRThread *thread)
|
| ** suspending). Therefore, get a real handle from
|
| ** the pseudo handle via DuplicateHandle(...)
|
| */
|
| - DuplicateHandle(
|
| + BOOL ok = DuplicateHandle(
|
| GetCurrentProcess(), /* Process of source handle */
|
| GetCurrentThread(), /* Pseudo Handle to dup */
|
| GetCurrentProcess(), /* Process of handle */
|
| @@ -73,6 +73,11 @@ _PR_MD_INIT_THREAD(PRThread *thread)
|
| 0L, /* access flags */
|
| FALSE, /* Inheritable */
|
| DUPLICATE_SAME_ACCESS); /* Options */
|
| + if (!ok) {
|
| + return PR_FAILURE;
|
| + }
|
| + thread->id = GetCurrentThreadId();
|
| + thread->md.id = thread->id;
|
| }
|
|
|
| /* Create the blocking IO semaphore */
|
|
|