gs-effect: Check if effect is nullptr, not if its a valid ptr

Woops, that somehow went completely by me without checking.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-08-07 16:17:12 +02:00
parent 7b0159947e
commit c6559d84ba

View file

@ -168,7 +168,7 @@ std::shared_ptr<gs::effect> gs::effect::create(std::string code, std::string nam
gs::effect_parameter::effect_parameter(std::shared_ptr<gs::effect> effect, gs_eparam_t* param) gs::effect_parameter::effect_parameter(std::shared_ptr<gs::effect> effect, gs_eparam_t* param)
: _effect(effect), _param(param) : _effect(effect), _param(param)
{ {
if (effect) if (!effect)
throw std::invalid_argument("effect"); throw std::invalid_argument("effect");
if (!param) if (!param)
throw std::invalid_argument("param"); throw std::invalid_argument("param");