Fix various reported SVACE errors
[platform/core/uifw/dali-core.git] / dali / public-api / events / long-press-gesture.cpp
index b9dd141..e329c82 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -37,10 +37,13 @@ LongPressGesture::LongPressGesture( const LongPressGesture& rhs )
 
 LongPressGesture& LongPressGesture::operator=( const LongPressGesture& rhs )
 {
-  Gesture::operator=(rhs);
-  numberOfTouches = rhs.numberOfTouches;
-  screenPoint = rhs.screenPoint;
-  localPoint = rhs.localPoint;
+  if( this != &rhs )
+  {
+    Gesture::operator=(rhs);
+    numberOfTouches = rhs.numberOfTouches;
+    screenPoint = rhs.screenPoint;
+    localPoint = rhs.localPoint;
+  }
 
   return *this;
 }