Skip to content

Commit

Permalink
Fixed crasher in WDStringKernel
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed May 12, 2012
1 parent ce010a1 commit 98cf573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shogun/kernel/WeightedDegreeStringKernel.h
Expand Up @@ -439,7 +439,9 @@ class CWeightedDegreeStringKernel: public CStringKernel<char>
*/
inline void set_wd_weights(SGVector<float64_t> new_weights)
{
set_weights(SGMatrix<float64_t>(new_weights.vector,new_weights.vlen,0));
SGMatrix<float64_t> matrix = SGMatrix<float64_t>(new_weights.vector,new_weights.vlen,0);
set_weights(matrix);
matrix.matrix = NULL;
}

/** set weights
Expand Down

0 comments on commit 98cf573

Please sign in to comment.