Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f4066405 authored by hhakim's avatar hhakim
Browse files

Fix nullptr handle of gpu_mod library used for loading.

parent 480675da
Branches
Tags 3.8.0rc6
No related merge requests found
Pipeline #834197 skipped
...@@ -14,7 +14,8 @@ namespace Faust { ...@@ -14,7 +14,8 @@ namespace Faust {
GPUModHandler::~GPUModHandler() GPUModHandler::~GPUModHandler()
{ {
gm_close_lib(gm_handle); if(gm_handle != nullptr)
gm_close_lib(gm_handle);
delete_mat_funcs(float); // it looks strange because load_all_mat_funcs is a macro (using a string tokenizer) delete_mat_funcs(float); // it looks strange because load_all_mat_funcs is a macro (using a string tokenizer)
delete_mat_funcs(double); // look def in faust_gpu_mod_utils.h delete_mat_funcs(double); // look def in faust_gpu_mod_utils.h
delete_mat_funcs(cuComplex); delete_mat_funcs(cuComplex);
...@@ -63,7 +64,8 @@ namespace Faust { ...@@ -63,7 +64,8 @@ namespace Faust {
else else
if(! silent) if(! silent)
std::cerr << "Warning: gm_lib is already loaded (can't reload it)." << endl; std::cerr << "Warning: gm_lib is already loaded (can't reload it)." << endl;
load_gm_functions(); if(this->gm_handle != nullptr)
load_gm_functions();
return this->gm_handle; return this->gm_handle;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment