X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fvariant.h;fp=source%2Fcore%2Fvariant.h;h=338ec90865d5a8dc0dc269e96f73577b1c42c04c;hp=443befb481620b4242e178a4b377192179af1adc;hb=d15b96b498d7cad51a0cb1dd949f70a04af246e9;hpb=41363aed34382386f915f17c1a961750b4fdcb14 diff --git a/source/core/variant.h b/source/core/variant.h index 443befb..338ec90 100644 --- a/source/core/variant.h +++ b/source/core/variant.h @@ -69,6 +69,9 @@ public: Variant &operator=(const Variant &v) { + if(&v==this) + return *this; + delete store; store = (v.store ? v.store->clone() : nullptr); return *this;