Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NullPointerException in AppLog.addEntry #145

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ In the following cases, the CI will publish a new version with the following for

- [WordPress for Android][2]
- [FluxC][3]
- [Woo for Android][4]

## License
Dual licensed under MIT, and GPL.

[1]: https://github.com/wordpress-mobile/WordPress-Utils-Android/blob/a9fbe8e6597d44055ec2180dbf45aecbfc332a20/WordPressUtils/build.gradle#L37
[2]: https://github.com/wordpress-mobile/WordPress-Android
[3]: https://github.com/wordpress-mobile/WordPress-FluxC-Android
[4]: https://github.com/woocommerce/woocommerce-android
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,12 @@ private static void addEntry(T tag, LogLevel level, String text) {

// Call our listeners if any
for (AppLogListener listener : currentListeners) {
listener.onLog(tag, level, text);
if (listener != null) {
listener.onLog(tag, level, text);
} else {
// Log a warning
w(T.UTILS, "AppLogListener is null when attempting to log.");
}
}
// Record entry if enabled
if (mEnableRecording) {
Expand Down
Loading