Index: OpenSceneGraph/trunk/src/osg/CopyOp.cpp
===================================================================
--- OpenSceneGraph/trunk/src/osg/CopyOp.cpp (revision 10362)
+++ OpenSceneGraph/trunk/src/osg/CopyOp.cpp (revision 10671)
@@ -19,4 +19,5 @@
 #include <osg/PrimitiveSet>
 #include <osg/Shape>
+#include <osg/StateAttribute>
 
 using namespace osg;
@@ -68,5 +69,5 @@
 NodeCallback* CopyOp::operator() (const NodeCallback* nc) const
 {
-    if (nc && _flags&DEEP_COPY_NODECALLBACKS)
+    if (nc && _flags&DEEP_COPY_CALLBACKS)
     {
         // deep copy the full chain of callback
@@ -86,2 +87,16 @@
         return const_cast<NodeCallback*>(nc);
 }
+
+
+StateAttributeCallback* CopyOp::operator() (const StateAttributeCallback* sc) const
+{
+    if (sc && _flags&DEEP_COPY_CALLBACKS)
+    {
+        // deep copy the full chain of callback
+        StateAttributeCallback* cb = dynamic_cast<StateAttributeCallback*>(sc->clone(*this));
+        return cb;
+    }
+    else
+        return const_cast<StateAttributeCallback*>(sc);
+}
+
