Makes sure log is not disposed.

If the log is disposed it will not cause the application to crash.