Skip to content

Commit

Permalink
Log when the listener is null
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardstruck committed Mar 15, 2024
1 parent a33885f commit ee033bb
Showing 1 changed file with 6 additions and 1 deletion.
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 ee033bb

Please sign in to comment.