proper initialization for ccimpl in bool CascadeClassifier::read(const FileNode

This commit is contained in:
berak 2014-02-08 14:42:09 +01:00
parent 42ac3123ec
commit 3959329ef4

View File

@ -1557,7 +1557,7 @@ bool CascadeClassifier::load( const String& filename )
bool CascadeClassifier::read(const FileNode &root)
{
Ptr<CascadeClassifierImpl> ccimpl;
Ptr<CascadeClassifierImpl> ccimpl = makePtr<CascadeClassifierImpl>();
bool ok = ccimpl->read_(root);
if( ok )
cc = ccimpl.staticCast<BaseCascadeClassifier>();