Robert Osfield
41eb850578
Fixed Coverity reported issue.
...
CID 11447: Unchecked dynamic_cast (FORWARD_NULL)
Dynamic cast to pointer "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))" can return null.
Assigning null: "first" = "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))".
The clone() implementation is written using macro's so that it always returns the type of Object
being cloned so it's normally safe to assume that a dynamic_cast<> will always return a valid pointer as long
as the new T that involves creates a valid object. However, if the class being cloned doesn't correctly
implement the clone() method then their potential for the dynamic_cast to fail and will return a NULL and will
result in a memory leak of the object of paraent class that the clone would have defaulted to.
I've tightened up the CopyOp.cpp code to check the return type and added better handling of the clone in the
osg::clone() methods so thay don't have any potential mememory leaks and report warnings to OSG_WARN when
problems are encountered. It may be more apporpriate to throw an exception so will need to ponder this
issue further.
2011-04-28 16:33:14 +00:00
..
2010-09-24 14:53:10 +00:00
2010-09-24 14:53:10 +00:00
2009-07-24 14:45:44 +00:00
2010-09-24 14:53:10 +00:00
2010-02-26 14:41:50 +00:00
2009-10-25 11:52:01 +00:00
2010-01-18 12:43:02 +00:00
2010-11-05 17:24:50 +00:00
2007-12-10 17:30:18 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 16:57:02 +00:00
2009-02-11 10:41:55 +00:00
2009-05-18 10:37:03 +00:00
2006-07-18 15:21:48 +00:00
2007-01-04 14:11:51 +00:00
2010-11-30 08:12:06 +00:00
2011-03-08 16:35:37 +00:00
2010-09-16 09:49:22 +00:00
2006-11-27 14:52:07 +00:00
2010-09-15 12:00:12 +00:00
2010-09-30 16:57:02 +00:00
2006-07-18 15:21:48 +00:00
2008-12-19 15:29:59 +00:00
2010-09-30 16:57:02 +00:00
2007-03-29 15:41:59 +00:00
2008-12-17 12:13:15 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 16:57:02 +00:00
2008-12-17 12:13:15 +00:00
2007-01-05 09:55:04 +00:00
2008-11-07 13:18:40 +00:00
2009-08-20 14:19:10 +00:00
2010-10-28 14:01:47 +00:00
2010-09-30 16:57:02 +00:00
2010-03-05 12:55:08 +00:00
2010-03-05 12:55:08 +00:00
2009-01-28 15:15:19 +00:00
2010-12-22 20:11:05 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 14:25:27 +00:00
2010-11-24 10:38:28 +00:00
2007-05-14 16:16:22 +00:00
2009-06-25 13:26:26 +00:00
2009-02-06 15:39:44 +00:00
2006-07-18 15:21:48 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 16:57:02 +00:00
2011-04-20 11:45:01 +00:00
2010-12-22 20:11:05 +00:00
2010-09-30 16:57:02 +00:00
2008-12-09 09:24:47 +00:00
2011-01-03 19:41:06 +00:00
2011-04-21 12:53:22 +00:00
2011-02-14 12:54:21 +00:00
2009-11-12 14:35:44 +00:00
2010-10-06 14:44:52 +00:00
2010-09-24 14:40:56 +00:00
2010-10-14 11:10:16 +00:00
2011-04-21 13:34:03 +00:00
2011-02-03 12:22:09 +00:00
2008-11-18 15:18:34 +00:00
2009-01-30 10:55:28 +00:00
2010-09-30 16:57:02 +00:00
2010-11-25 12:07:59 +00:00
2010-01-07 12:14:47 +00:00
2010-08-09 17:02:31 +00:00
2010-01-26 16:50:26 +00:00
2010-09-24 14:38:01 +00:00
2010-01-26 13:05:05 +00:00
2010-09-30 16:57:02 +00:00
2010-09-30 16:57:02 +00:00
2007-01-07 10:00:50 +00:00
2008-03-13 16:05:40 +00:00
2009-10-25 11:52:01 +00:00
2005-04-11 17:14:17 +00:00
2008-04-03 18:36:50 +00:00
2010-09-30 16:57:02 +00:00
2009-10-25 11:52:01 +00:00
2009-11-18 12:15:29 +00:00
2008-06-20 15:50:53 +00:00
2008-09-17 16:14:28 +00:00
2010-02-26 14:41:50 +00:00
2006-07-18 15:21:48 +00:00
2008-06-27 12:44:41 +00:00
2010-09-30 16:57:02 +00:00
2011-01-12 19:29:24 +00:00
2006-12-19 17:16:14 +00:00
2010-02-15 20:15:32 +00:00
2011-01-12 19:29:24 +00:00
2010-06-01 09:23:21 +00:00
2011-04-28 16:33:14 +00:00
2010-11-25 12:07:59 +00:00
2010-09-15 12:00:12 +00:00
2010-05-14 12:24:13 +00:00
2010-09-15 12:00:12 +00:00
2010-12-22 20:11:05 +00:00
2011-01-20 12:32:20 +00:00
2010-12-22 20:11:05 +00:00
2010-11-19 18:07:17 +00:00
2010-09-30 16:57:02 +00:00
2007-03-05 17:34:36 +00:00
2009-10-25 11:52:01 +00:00
2009-10-28 20:31:57 +00:00
2009-10-25 11:52:01 +00:00
2009-05-07 18:30:33 +00:00
2006-07-18 15:21:48 +00:00
2010-11-23 14:50:31 +00:00
2011-02-14 15:01:56 +00:00
2006-07-18 15:21:48 +00:00
2009-06-12 10:08:15 +00:00
2006-07-18 15:21:48 +00:00
2010-06-01 11:28:04 +00:00
2010-09-15 12:00:12 +00:00
2010-06-01 09:21:42 +00:00
2010-09-30 16:57:02 +00:00
2010-01-13 13:30:14 +00:00
2009-10-25 11:52:01 +00:00
2010-11-23 14:50:31 +00:00
2010-07-10 17:14:59 +00:00
2010-07-05 16:32:58 +00:00
2007-12-10 17:30:18 +00:00
2010-11-01 10:31:30 +00:00
2008-08-18 10:47:43 +00:00
2011-02-03 12:42:23 +00:00
2010-11-29 17:43:27 +00:00
2009-10-22 12:01:06 +00:00
2011-02-14 12:54:21 +00:00
2010-12-22 20:11:05 +00:00
2010-09-30 16:57:02 +00:00
2010-09-15 09:56:16 +00:00
2008-12-09 09:24:47 +00:00
2009-01-07 10:32:59 +00:00
2010-09-24 14:53:10 +00:00
2009-10-25 11:52:01 +00:00
2010-09-30 16:57:02 +00:00
2010-09-24 14:53:10 +00:00
2010-09-24 14:53:10 +00:00
2010-09-24 14:53:10 +00:00
2011-04-21 17:04:50 +00:00
2010-09-24 14:53:10 +00:00
2010-12-03 14:18:16 +00:00
2010-09-24 14:53:10 +00:00
2010-04-30 19:41:24 +00:00
2010-10-08 11:20:56 +00:00
2010-10-09 11:27:45 +00:00
2009-04-24 09:07:22 +00:00
2010-09-24 14:53:10 +00:00
2010-09-24 14:53:10 +00:00
2009-10-30 15:17:38 +00:00
2007-12-10 17:30:18 +00:00
2010-12-12 08:54:58 +00:00
2010-11-26 13:54:11 +00:00
2006-07-18 15:21:48 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-24 14:53:10 +00:00
2010-09-16 10:33:51 +00:00
2006-07-18 15:21:48 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-24 14:53:10 +00:00
2006-07-18 15:21:48 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2010-09-16 10:33:51 +00:00
2011-04-26 15:24:21 +00:00
2010-09-30 16:57:02 +00:00
2011-03-15 13:30:27 +00:00
2010-09-30 16:57:02 +00:00