diff --git a/lib/library.cpp b/lib/library.cpp index a41f527dba9..26f313678b5 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -157,6 +157,9 @@ Library::Library(const Library& other) Library& Library::operator=(const Library& other) & { + if (this == &other) + return *this; + mData.reset(new LibraryData(*other.mData)); return *this; }