Skip to content

Commit

Permalink
Fix copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
KinoMyu committed Feb 6, 2018
1 parent c421ffb commit da2a3b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/HCAStreamChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ HCAStreamChannel::HCAStreamChannel(const HCAStreamChannel& other)
{
if (other.ptr == nullptr)
{
HCAStreamChannel(nullptr);
HCAStreamChannel(other->dec);
return;
}
dec = other->dec;
flags = other.flags;
size = other.size;
ptr = new char[size];
for (size_t i = 0; i < size; ++i) ((char*)ptr)[i] = ((char*)other.ptr)[i];
Expand Down

0 comments on commit da2a3b7

Please sign in to comment.