Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@ -311,7 +311,7 @@ class CommandQueueMT {
|
||||
};
|
||||
|
||||
struct SyncCommand : public CommandBase {
|
||||
SyncSemaphore *sync_sem;
|
||||
SyncSemaphore *sync_sem = nullptr;
|
||||
|
||||
virtual void post() {
|
||||
sync_sem->sem.post();
|
||||
|
||||
Reference in New Issue
Block a user