summaryrefslogtreecommitdiff
path: root/basegfx/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/inc')
-rw-r--r--basegfx/source/inc/hommatrixtemplate.hxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/basegfx/source/inc/hommatrixtemplate.hxx b/basegfx/source/inc/hommatrixtemplate.hxx
index b7106f6fb22d..667e7ecdb3b0 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -119,14 +119,17 @@ namespace basegfx
ImplHomMatrixTemplate& operator=(const ImplHomMatrixTemplate& rToBeCopied)
{
- // complete initialization using copy
- for(sal_uInt16 a(0); a < (RowSize - 1); a++)
+ if (this != &rToBeCopied)
{
- memcpy(&maLine[a], &rToBeCopied.maLine[a], sizeof(ImplMatLine< RowSize >));
- }
- if(rToBeCopied.mpLine)
- {
- mpLine.reset( new ImplMatLine< RowSize >((RowSize - 1), rToBeCopied.mpLine.get()) );
+ // complete initialization using copy
+ for(sal_uInt16 a(0); a < (RowSize - 1); a++)
+ {
+ memcpy(&maLine[a], &rToBeCopied.maLine[a], sizeof(ImplMatLine< RowSize >));
+ }
+ if(rToBeCopied.mpLine)
+ {
+ mpLine.reset( new ImplMatLine< RowSize >((RowSize - 1), rToBeCopied.mpLine.get()) );
+ }
}
return *this;
}