Skip to content

Commit

Permalink
Merge pull request #145 from wordpress-mobile/fix/eventbus_exception_…
Browse files Browse the repository at this point in the history
…invoking_subscriber_failed

Fix NullPointerException in AppLog.addEntry
  • Loading branch information
backwardstruck committed Aug 19, 2024
2 parents 09ebdc1 + d8c8e04 commit f2f9795
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit f2f9795

Please sign in to comment.