From f271e9e34c1deb6cf3dcaf0a67c10079d2f25024 Mon Sep 17 00:00:00 2001 From: Pinterf Date: Thu, 19 Mar 2020 07:47:11 +0100 Subject: [PATCH] PluginManager::AddFunction remove unnecessary assert --- avs_core/core/PluginManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/avs_core/core/PluginManager.cpp b/avs_core/core/PluginManager.cpp index d9e5b3e66..f162645d8 100644 --- a/avs_core/core/PluginManager.cpp +++ b/avs_core/core/PluginManager.cpp @@ -981,8 +981,14 @@ void PluginManager::AddFunction(const char* name, const char* params, IScriptEnv else { newFunc = new AVSFunction(name, NULL, params, apply, user_data, NULL); + /* + // Comment out but kept for reference. + // This assert is false when AddFunction is called from a cpp non-plugin. + // e.g. a "master" that directly loads avisynth + // The extemption could handle only situations when function was loaded by C interface avs_add_function. if(apply != &create_c_video_filter) assert(newFunc->IsScriptFunction()); + */ } // Warn user if a function with the same name is already registered by another plugin