mirror of https://github.com/LX3JL/xlxd.git
During testing in a sandbox environment, xlxd crashed in
CG3Protocol::Close(). The root cause was dereferencing
m_pPresenceThread when the object had never been initialized.
In this case an error occured during ::Init() which set ok=false,
so the initialization of the threads was skipped.
This commit does 3 things:
(1) Default initializes the thread pointers to avoid the crash.
(2) Wraps the thread allocation with try/catch since std::thread can
throw.
(3) Does some light cleaning in ::Close, e.g., converting NULL to
nullptr.
pull/229/head
parent
6752c7b254
commit
d4c72fd623
Loading…
Reference in new issue