dnnsoftware/Dnn.Platform — pull request #49 by bdukes (2013-12-20 16:13:53+00:00)
Title: (DNN-4471) Check for null ModuleControl within ActionButton control

When a container, such as the default Pop-Up Container, uses `ActionButton` controls, errors that occur early in the module's lifetime will cause the `ActionButton` to not get setup completely, and throw errors.

This means that when errors occur in the module, the users sees an error message that doesn't have anything to do with the real error. In the same way, when they look in the Event Viewer, they need to know to ignore the most recent error, and look at the first error that occurred in the group of errors.

To address the issue, I had the control short-circuit its operation if it detect that it isn't setup correctly, instead of getting to the null reference. This fixes the extraneous null reference errors. The real error still gets logged three different times, which may be a separate issue to look at; however, wherever you look, you see a meaningful error, so I think it's a clear improvement.