blackberry/Cascades-Samples — pull request #5 by smacmartin (2012-05-18 21:01:05+00:00)
Title: Check for null after dynamic_cast

dynamic_cast can return 0 if the pointer is 0 or if it is the wrong type. It is preferred over static_cast to ensure that the caller has sent the type expected. So every dynamic_cast should be followed by a check for 0 or NULL.