diff --git a/growingio-data/database/src/main/java/com/growingio/android/database/EventDataManager.java b/growingio-data/database/src/main/java/com/growingio/android/database/EventDataManager.java index 35cd3e8e..4df50c23 100644 --- a/growingio-data/database/src/main/java/com/growingio/android/database/EventDataManager.java +++ b/growingio-data/database/src/main/java/com/growingio/android/database/EventDataManager.java @@ -181,7 +181,11 @@ void queryEvents(int policy, int limit, EventDbResult dbResult) { Logger.e(TAG, t, t.getMessage()); } finally { if (client != null) { - client.release(); + try { + client.release(); + } catch (java.lang.NullPointerException e) { + // does nothing, Binder connection already null + } } } } @@ -225,7 +229,11 @@ void queryEventsAndDelete(int policy, int limit, EventDbResult dbResult) { Logger.e(TAG, t, t.getMessage()); } finally { if (client != null) { - client.release(); + try { + client.release(); + } catch (java.lang.NullPointerException e) { + // does nothing, Binder connection already null + } } } }