Fix bug: cv::String would break if assigned to itself.

pull/1089/head
Roman Donchenko 12 years ago
parent 70deda354a
commit 4692d4b36e
  1. 2
      modules/core/include/opencv2/core/cvstd.hpp

@ -580,6 +580,8 @@ String::~String()
inline
String& String::operator=(const String& str)
{
if (&str == this) return *this;
deallocate();
if (str.cstr_) CV_XADD(((int*)str.cstr_)-1, 1);
cstr_ = str.cstr_;

Loading…
Cancel
Save