diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 44b408f3..9bdb63f6 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -161,7 +161,7 @@ void filter::blur::blur_factory::on_list_fill() char* file = obs_module_file("effects/color-conversion.effect"); try { color_converter_effect = std::make_shared(file); - } catch (std::runtime_error ex) { + } catch (std::runtime_error& ex) { P_LOG_ERROR(" Loading effect '%s' failed with error(s): %s", file, ex.what()); } bfree(file); @@ -170,7 +170,7 @@ void filter::blur::blur_factory::on_list_fill() char* file = obs_module_file("effects/mask.effect"); try { mask_effect = std::make_shared(file); - } catch (std::runtime_error ex) { + } catch (std::runtime_error& ex) { P_LOG_ERROR(" Loading effect '%s' failed with error(s): %s", file, ex.what()); } bfree(file); @@ -318,7 +318,7 @@ filter::blur::blur_instance::blur_instance(obs_data_t* settings, obs_source_t* p try { this->m_source_rt = std::make_shared(GS_RGBA, GS_ZS_NONE); this->m_output_rt = std::make_shared(GS_RGBA, GS_ZS_NONE); - } catch (std::exception ex) { + } catch (std::exception& ex) { P_LOG_ERROR(" Failed to create rendertargets, error %s.", obs_source_get_name(m_self), ex.what()); } diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 9668c58d..44d35d9b 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -133,7 +133,7 @@ filter::dynamic_mask::dynamic_mask_instance::dynamic_mask_instance(obs_data_t* d char* file = obs_module_file("effects/channel-mask.effect"); try { this->effect = std::make_shared(file); - } catch (std::exception ex) { + } catch (std::exception& ex) { P_LOG_ERROR("Loading channel mask effect failed with error(s):\n%s", ex.what()); } assert(this->effect != nullptr);