libobs/util: Make default val INVALID_HANDLE_VALUE
Certain windows functions may allow 0 as a valid handle value, therefore INVALID_HANDLE_VALUE is a more appropriate initialization value. Closes obsproject/obs-studio#1519
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#pragma once
|
||||
|
||||
class WinHandle {
|
||||
HANDLE handle;
|
||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||
|
||||
inline void Clear()
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class WinHandle {
|
||||
}
|
||||
|
||||
public:
|
||||
inline WinHandle() : handle(NULL) {}
|
||||
inline WinHandle() {}
|
||||
inline WinHandle(HANDLE handle_) : handle(handle_) {}
|
||||
inline ~WinHandle() {Clear();}
|
||||
|
||||
|
Reference in New Issue
Block a user