-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent a NullPointerException in Logfile
When stopLogPlayer is called, a running log analyzer may still be running and will be aborted. It may take a moment for the thread to stop. At that point logfile may already be set to null. The LogAnalyzerThread, however, called the "finished" callback either way. In that callback, we're trying to access logfile (which is now null) and there's our NullPointerException. This solution does not run any callbacks once the analyzer was aborted. Should the abortion happen just while the callback is running, we'll use a local reference to logfile to prevent a very unlucky NullPointerException at that point.
- Loading branch information
1 parent
8d440fb
commit 5d78c1b
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters