Commit e90c2335 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #2984 from cambyse:2.4

parents 06897dbd 5a5a4876
...@@ -684,6 +684,8 @@ template<typename _Tp> inline void Mat::push_back(const _Tp& elem) ...@@ -684,6 +684,8 @@ template<typename _Tp> inline void Mat::push_back(const _Tp& elem)
{ {
if( !data ) if( !data )
{ {
CV_Assert((type()==0) || (DataType<_Tp>::type == type()));
*this = Mat(1, 1, DataType<_Tp>::type, (void*)&elem).clone(); *this = Mat(1, 1, DataType<_Tp>::type, (void*)&elem).clone();
return; return;
} }
......
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