From c6559d84ba880699a4205214a53b8d9c1dfd9990 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 7 Aug 2019 16:17:12 +0200 Subject: [PATCH] gs-effect: Check if effect is nullptr, not if its a valid ptr Woops, that somehow went completely by me without checking. --- source/obs/gs/gs-effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index 9dd32e44..2b158d65 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -168,7 +168,7 @@ std::shared_ptr gs::effect::create(std::string code, std::string nam gs::effect_parameter::effect_parameter(std::shared_ptr effect, gs_eparam_t* param) : _effect(effect), _param(param) { - if (effect) + if (!effect) throw std::invalid_argument("effect"); if (!param) throw std::invalid_argument("param");