Commit 3ef8ced0 authored by Julien Michel's avatar Julien Michel

BUG: Adding null-check guards in desctructor before calling libsvm free...

BUG: Adding null-check guards in desctructor before calling libsvm free function (attempt to fix bug #1023)
parent b315bdca
......@@ -105,7 +105,10 @@ template <class TValue, class TLabel>
void
SVMModel<TValue, TLabel>::DeleteModel()
{
svm_free_and_destroy_model(&m_Model);
if(m_Model)
{
svm_free_and_destroy_model(&m_Model);
}
m_Model = NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment