diff -ruN OpenColorIO-1.1.1-orig/src/core/AllocationTransform.cpp OpenColorIO-1.1.1/src/core/AllocationTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/AllocationTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/AllocationTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -65,9 +65,12 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            allocation_ = rhs.allocation_;
-            vars_ = rhs.vars_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                allocation_ = rhs.allocation_;
+                vars_ = rhs.vars_;
+            }
             return *this;
         }
     };
@@ -95,7 +98,10 @@
     
     AllocationTransform& AllocationTransform::operator= (const AllocationTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/Baker.cpp OpenColorIO-1.1.1/src/core/Baker.cpp
--- OpenColorIO-1.1.1-orig/src/core/Baker.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/Baker.cpp	2022-12-24 08:13:53.000000000 -0500
@@ -75,14 +75,17 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            config_      = rhs.config_;
-            formatName_  = rhs.formatName_;
-            inputSpace_  = rhs.inputSpace_;
-            shaperSpace_ = rhs.shaperSpace_;
-            looks_        = rhs.looks_;
-            targetSpace_ = rhs.targetSpace_;
-            shapersize_  = rhs.shapersize_;
-            cubesize_    = rhs.cubesize_;
+            if (this != &rhs)
+            {
+                config_ = rhs.config_;
+                formatName_ = rhs.formatName_;
+                inputSpace_ = rhs.inputSpace_;
+                shaperSpace_ = rhs.shaperSpace_;
+                looks_ = rhs.looks_;
+                targetSpace_ = rhs.targetSpace_;
+                shapersize_ = rhs.shapersize_;
+                cubesize_ = rhs.cubesize_;
+            }
             return *this;
         }
     };
diff -ruN OpenColorIO-1.1.1-orig/src/core/CDLTransform.cpp OpenColorIO-1.1.1/src/core/CDLTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/CDLTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/CDLTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -560,7 +560,7 @@
         float sat_;
         std::string id_;
         std::string description_;
-        
+
         mutable std::string xml_;
         
         Impl() :
@@ -585,13 +585,16 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            
-            memcpy(sop_, rhs.sop_, sizeof(float)*9);
-            sat_ = rhs.sat_;
-            id_ = rhs.id_;
-            description_ = rhs.description_;
-            
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+
+                memcpy(sop_, rhs.sop_, sizeof(float) * 9);
+                sat_ = rhs.sat_;
+                id_ = rhs.id_;
+                description_ = rhs.description_;
+            }
+
             return *this;
         }
         
@@ -622,7 +625,10 @@
     
     CDLTransform& CDLTransform::operator= (const CDLTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/ColorSpace.cpp OpenColorIO-1.1.1/src/core/ColorSpace.cpp
--- OpenColorIO-1.1.1-orig/src/core/ColorSpace.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/ColorSpace.cpp	2022-12-24 08:13:53.000000000 -0500
@@ -78,23 +78,28 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            name_ = rhs.name_;
-            family_ = rhs.family_;
-            equalityGroup_ = rhs.equalityGroup_;
-            description_ = rhs.description_;
-            bitDepth_ = rhs.bitDepth_;
-            isData_ = rhs.isData_;
-            allocation_ = rhs.allocation_;
-            allocationVars_ = rhs.allocationVars_;
-            
-            toRefTransform_ = rhs.toRefTransform_;
-            if(toRefTransform_) toRefTransform_ = toRefTransform_->createEditableCopy();
-            
-            fromRefTransform_ = rhs.fromRefTransform_;
-            if(fromRefTransform_) fromRefTransform_ = fromRefTransform_->createEditableCopy();
-            
-            toRefSpecified_ = rhs.toRefSpecified_;
-            fromRefSpecified_ = rhs.fromRefSpecified_;
+            if (this != &rhs)
+            {
+                name_ = rhs.name_;
+                family_ = rhs.family_;
+                equalityGroup_ = rhs.equalityGroup_;
+                description_ = rhs.description_;
+                bitDepth_ = rhs.bitDepth_;
+                isData_ = rhs.isData_;
+                allocation_ = rhs.allocation_;
+                allocationVars_ = rhs.allocationVars_;
+
+                toRefTransform_ = rhs.toRefTransform_?
+                    rhs.toRefTransform_->createEditableCopy()
+                    : rhs.toRefTransform_;
+
+                fromRefTransform_ = rhs.fromRefTransform_?
+                    rhs.fromRefTransform_->createEditableCopy()
+                    : rhs.fromRefTransform_;
+
+                toRefSpecified_ = rhs.toRefSpecified_;
+                fromRefSpecified_ = rhs.fromRefSpecified_;
+            }
             return *this;
         }
     };
diff -ruN OpenColorIO-1.1.1-orig/src/core/ColorSpaceTransform.cpp OpenColorIO-1.1.1/src/core/ColorSpaceTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/ColorSpaceTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/ColorSpaceTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -61,9 +61,12 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            src_ = rhs.src_;
-            dst_ = rhs.dst_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                src_ = rhs.src_;
+                dst_ = rhs.dst_;
+            }
             return *this;
         }
     };
@@ -92,7 +95,10 @@
     
     ColorSpaceTransform& ColorSpaceTransform::operator= (const ColorSpaceTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/Config.cpp OpenColorIO-1.1.1/src/core/Config.cpp
--- OpenColorIO-1.1.1-orig/src/core/Config.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/Config.cpp	2022-12-24 08:13:53.000000000 -0500
@@ -301,7 +301,8 @@
                 colorspaces_.reserve(rhs.colorspaces_.size());
                 for(unsigned int i=0; i<rhs.colorspaces_.size(); ++i)
                 {
-                    colorspaces_.push_back(rhs.colorspaces_[i]->createEditableCopy());
+                    colorspaces_.push_back(
+                        rhs.colorspaces_[i]->createEditableCopy());
                 }
                 
                 // Deep copy the looks
@@ -309,7 +310,8 @@
                 looksList_.reserve(rhs.looksList_.size());
                 for(unsigned int i=0; i<rhs.looksList_.size(); ++i)
                 {
-                    looksList_.push_back(rhs.looksList_[i]->createEditableCopy());
+                    looksList_.push_back(
+                        rhs.looksList_[i]->createEditableCopy());
                 }
                 
                 // Assignment operator will suffice for these
@@ -330,7 +332,7 @@
                 sanitytext_ = rhs.sanitytext_;
                 
                 cacheids_ = rhs.cacheids_;
-                cacheidnocontext_ = cacheidnocontext_;
+                cacheidnocontext_ = rhs.cacheidnocontext_;
             }
             return *this;
         }
diff -ruN OpenColorIO-1.1.1-orig/src/core/DisplayTransform.cpp OpenColorIO-1.1.1/src/core/DisplayTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/DisplayTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/DisplayTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -71,27 +71,30 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            inputColorSpaceName_ = rhs.inputColorSpaceName_;
-            
-            linearCC_ = rhs.linearCC_;
-            if(linearCC_) linearCC_ = linearCC_->createEditableCopy();
-            
-            colorTimingCC_ = rhs.colorTimingCC_;
-            if(colorTimingCC_) colorTimingCC_ = colorTimingCC_->createEditableCopy();
-            
-            channelView_ = rhs.channelView_;
-            if(channelView_) channelView_ = channelView_->createEditableCopy();
-            
-            display_ = rhs.display_;
-            view_ = rhs.view_;
-            
-            displayCC_ = rhs.displayCC_;
-            if(displayCC_) displayCC_ = displayCC_->createEditableCopy();
-            
-            looksOverride_ = rhs.looksOverride_;
-            looksOverrideEnabled_ = rhs.looksOverrideEnabled_;
-            
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                inputColorSpaceName_ = rhs.inputColorSpaceName_;
+
+                linearCC_ = rhs.linearCC_?
+                    rhs.linearCC_->createEditableCopy() : rhs.linearCC_;
+
+                colorTimingCC_ = rhs.colorTimingCC_?
+                    rhs.colorTimingCC_->createEditableCopy()
+                    : rhs.colorTimingCC_;
+
+                channelView_ = rhs.channelView_?
+                    rhs.channelView_->createEditableCopy() : rhs.channelView_;
+
+                display_ = rhs.display_;
+                view_ = rhs.view_;
+
+                displayCC_ = rhs.displayCC_?
+                    rhs.displayCC_->createEditableCopy() : rhs.displayCC_;
+
+                looksOverride_ = rhs.looksOverride_;
+                looksOverrideEnabled_ = rhs.looksOverrideEnabled_;
+            }
             return *this;
         }
     };
@@ -121,7 +124,10 @@
     
     DisplayTransform& DisplayTransform::operator= (const DisplayTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/ExponentTransform.cpp OpenColorIO-1.1.1/src/core/ExponentTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/ExponentTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/ExponentTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -67,8 +67,11 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            memcpy(value_, rhs.value_, 4*sizeof(float));
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                memcpy(value_, rhs.value_, 4 * sizeof(float));
+            }
             return *this;
         }
     };
@@ -97,7 +100,10 @@
     
     ExponentTransform& ExponentTransform::operator= (const ExponentTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/FileTransform.cpp OpenColorIO-1.1.1/src/core/FileTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/FileTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/FileTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -70,10 +70,13 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            src_ = rhs.src_;
-            cccid_ = rhs.cccid_;
-            interp_ = rhs.interp_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                src_ = rhs.src_;
+                cccid_ = rhs.cccid_;
+                interp_ = rhs.interp_;
+            }
             return *this;
         }
     };
@@ -101,7 +104,10 @@
     
     FileTransform& FileTransform::operator= (const FileTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/GpuShaderDesc.cpp OpenColorIO-1.1.1/src/core/GpuShaderDesc.cpp
--- OpenColorIO-1.1.1-orig/src/core/GpuShaderDesc.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/GpuShaderDesc.cpp	2022-12-24 08:29:49.000000000 -0500
@@ -55,10 +55,13 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            language_ = rhs.language_;
-            functionName_ = rhs.functionName_;
-            lut3DEdgeLen_ = rhs.lut3DEdgeLen_;
-            cacheID_ = rhs.cacheID_;
+            if (this != &rhs)
+            {
+                language_ = rhs.language_;
+                functionName_ = rhs.functionName_;
+                lut3DEdgeLen_ = rhs.lut3DEdgeLen_;
+                cacheID_ = rhs.cacheID_;
+            }
             return *this;
         }
     };
diff -ruN OpenColorIO-1.1.1-orig/src/core/GroupTransform.cpp OpenColorIO-1.1.1/src/core/GroupTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/GroupTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/GroupTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -65,15 +65,17 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            
-            vec_.clear();
-            
-            for(unsigned int i=0; i<rhs.vec_.size(); ++i)
+            if (this != &rhs)
             {
-                vec_.push_back(rhs.vec_[i]->createEditableCopy());
+                dir_ = rhs.dir_;
+
+                vec_.clear();
+
+                for (unsigned int i = 0; i < rhs.vec_.size(); ++i)
+                {
+                    vec_.push_back(rhs.vec_[i]->createEditableCopy());
+                }
             }
-            
             return *this;
         }
     };
diff -ruN OpenColorIO-1.1.1-orig/src/core/LogTransform.cpp OpenColorIO-1.1.1/src/core/LogTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/LogTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/LogTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -64,8 +64,11 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            base_ = rhs.base_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                base_ = rhs.base_;
+            }
             return *this;
         }
     };
@@ -93,7 +96,10 @@
     
     LogTransform& LogTransform::operator= (const LogTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/Look.cpp OpenColorIO-1.1.1/src/core/Look.cpp
--- OpenColorIO-1.1.1-orig/src/core/Look.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/Look.cpp	2022-12-24 08:13:53.000000000 -0500
@@ -61,16 +61,19 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            name_ = rhs.name_;
-            processSpace_ = rhs.processSpace_;
-            description_ = rhs.description_;
-            
-            transform_ = rhs.transform_;
-            if(transform_) transform_ = transform_->createEditableCopy();
-            
-            inverseTransform_ = rhs.inverseTransform_;
-            if(inverseTransform_) inverseTransform_ = inverseTransform_->createEditableCopy();
-            
+            if (this != &rhs)
+            {
+                name_ = rhs.name_;
+                processSpace_ = rhs.processSpace_;
+                description_ = rhs.description_;
+
+                transform_ = rhs.transform_?
+                    rhs.transform_->createEditableCopy() : rhs.transform_;
+
+                inverseTransform_ = rhs.inverseTransform_?
+                    rhs.inverseTransform_->createEditableCopy()
+                    : rhs.inverseTransform_;
+            }
             return *this;
         }
     };
diff -ruN OpenColorIO-1.1.1-orig/src/core/LookTransform.cpp OpenColorIO-1.1.1/src/core/LookTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/LookTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/LookTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -68,10 +68,13 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            src_ = rhs.src_;
-            dst_ = rhs.dst_;
-            looks_ = rhs.looks_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                src_ = rhs.src_;
+                dst_ = rhs.dst_;
+                looks_ = rhs.looks_;
+            }
             return *this;
         }
     };
@@ -100,7 +103,10 @@
     
     LookTransform& LookTransform::operator= (const LookTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/MatrixTransform.cpp OpenColorIO-1.1.1/src/core/MatrixTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/MatrixTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/MatrixTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -65,9 +65,12 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            memcpy(matrix_, rhs.matrix_, 16*sizeof(float));
-            memcpy(offset_, rhs.offset_, 4*sizeof(float));
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                memcpy(matrix_, rhs.matrix_, 16 * sizeof(float));
+                memcpy(offset_, rhs.offset_, 4 * sizeof(float));
+            }
             return *this;
         }
     };
@@ -96,7 +99,10 @@
     
     MatrixTransform& MatrixTransform::operator= (const MatrixTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
diff -ruN OpenColorIO-1.1.1-orig/src/core/TruelightTransform.cpp OpenColorIO-1.1.1/src/core/TruelightTransform.cpp
--- OpenColorIO-1.1.1-orig/src/core/TruelightTransform.cpp	2019-03-28 01:12:57.000000000 -0400
+++ OpenColorIO-1.1.1/src/core/TruelightTransform.cpp	2022-12-24 08:20:19.000000000 -0500
@@ -70,17 +70,20 @@
         
         Impl& operator= (const Impl & rhs)
         {
-            dir_ = rhs.dir_;
-            configroot_ = rhs.configroot_;
-            profile_ = rhs.profile_;
-            camera_ = rhs.camera_;
-            inputdisplay_ = rhs.inputdisplay_;
-            recorder_ = rhs.recorder_;
-            print_ = rhs.print_;
-            lamp_ = rhs.lamp_;
-            outputcamera_ = rhs.outputcamera_;
-            display_ = rhs.display_;
-            cubeinput_ = rhs.cubeinput_;
+            if (this != &rhs)
+            {
+                dir_ = rhs.dir_;
+                configroot_ = rhs.configroot_;
+                profile_ = rhs.profile_;
+                camera_ = rhs.camera_;
+                inputdisplay_ = rhs.inputdisplay_;
+                recorder_ = rhs.recorder_;
+                print_ = rhs.print_;
+                lamp_ = rhs.lamp_;
+                outputcamera_ = rhs.outputcamera_;
+                display_ = rhs.display_;
+                cubeinput_ = rhs.cubeinput_;
+            }
             return *this;
         }
     };
@@ -117,7 +120,10 @@
     
     TruelightTransform& TruelightTransform::operator= (const TruelightTransform & rhs)
     {
-        *m_impl = *rhs.m_impl;
+        if (this != &rhs)
+        {
+            *m_impl = *rhs.m_impl;
+        }
         return *this;
     }
     
