X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdecklink%2Fconsumer%2Fdecklink_consumer.cpp;h=2d7af477bf19abe8c930ffc777f59a557079e64b;hb=db7c036ecbc5ce0a2afdd982c1ec17635af067a0;hp=d4da7d9da3736430b9efc73d3c1dbbf1f19fc09e;hpb=07af14b582940a9f486e8870eb42f0669692d01e;p=casparcg diff --git a/modules/decklink/consumer/decklink_consumer.cpp b/modules/decklink/consumer/decklink_consumer.cpp index d4da7d9da..2d7af477b 100644 --- a/modules/decklink/consumer/decklink_consumer.cpp +++ b/modules/decklink/consumer/decklink_consumer.cpp @@ -219,7 +219,12 @@ public: virtual ULONG STDMETHODCALLTYPE Release() { if(--ref_count_ == 0) + { delete this; + + return 0; + } + return ref_count_; }