0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

libobs: Fix move assignment operator for ComPtr

We can't compare addresses of ComPtr for self-reference directly because
the address-of operator is overloaded, causing a compiler error. This
fix more or less matches the WRL implementation.
This commit is contained in:
James Park 2019-03-31 19:09:50 -07:00 committed by jp9000
parent a0ead6f974
commit a3e5344cce

View File

@ -68,7 +68,7 @@ public:
inline ComPtr<T> &operator=(ComPtr<T> &&c)
{
if (this != &c) {
if (&ptr != &c.ptr) {
Kill();
ptr = c.ptr;
c.ptr = nullptr;