Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed pointer checking before SG_UNREF in StreamingStringFeatures.
  • Loading branch information
frx committed Aug 26, 2011
1 parent a6bf023 commit 1d81f89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/shogun/features/StreamingStringFeatures.h
Expand Up @@ -102,8 +102,7 @@ template <class T> class CStreamingStringFeatures : public CStreamingFeatures
*/
void use_alphabet(EAlphabet alpha)
{
if (alphabet)
SG_UNREF(alphabet);
SG_UNREF(alphabet);

alphabet=new CAlphabet(alpha);
SG_REF(alphabet);
Expand All @@ -118,8 +117,7 @@ template <class T> class CStreamingStringFeatures : public CStreamingFeatures
*/
void use_alphabet(CAlphabet* alpha)
{
if (alphabet)
SG_UNREF(alphabet);
SG_UNREF(alphabet);

alphabet=new CAlphabet(alpha);
SG_REF(alphabet);
Expand Down

0 comments on commit 1d81f89

Please sign in to comment.