VirtualBox

Changeset 92253 in vbox


Ignore:
Timestamp:
Nov 7, 2021 2:02:46 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/RTThreadIsMain: Check for NIL_RTTHREAD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r90803 r92253  
    998998RTDECL(bool) RTThreadIsMain(RTTHREAD hThread)
    999999{
    1000     PRTTHREADINT pThread = rtThreadGet(hThread);
    1001     if (pThread)
    1002     {
    1003         bool fRc = !!(pThread->fIntFlags & RTTHREADINT_FLAGS_MAIN);
    1004         rtThreadRelease(pThread);
    1005         return fRc;
     1000    if (hThread != NIL_RTTHREAD)
     1001    {
     1002        PRTTHREADINT pThread = rtThreadGet(hThread);
     1003        if (pThread)
     1004        {
     1005            bool fRc = !!(pThread->fIntFlags & RTTHREADINT_FLAGS_MAIN);
     1006            rtThreadRelease(pThread);
     1007            return fRc;
     1008        }
    10061009    }
    10071010    return false;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette