Skip to content

Commit

Permalink
Fix crash creating "no config" config (#1531)
Browse files Browse the repository at this point in the history
Fixes #1529

I wish I could write a test for this unfortunately that seems tricky without creating an entirely new and separate test module.
  • Loading branch information
pyricau authored Aug 12, 2019
1 parent 81b821e commit 80da4cd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import leakcanary.GcTrigger
import leakcanary.LeakCanary
import leakcanary.LeakCanary.Config
import leakcanary.AppWatcher
import leakcanary.OnHeapAnalyzedListener
import leakcanary.OnObjectRetainedListener
import leakcanary.internal.activity.LeakActivity
import shark.SharkLog
Expand Down Expand Up @@ -50,7 +51,10 @@ internal object InternalLeakCanary : (Application) -> Unit, OnObjectRetainedList

val noInstallConfig: Config
get() = Config(
dumpHeap = false, referenceMatchers = emptyList(), objectInspectors = emptyList()
dumpHeap = false,
referenceMatchers = emptyList(),
objectInspectors = emptyList(),
onHeapAnalyzedListener = OnHeapAnalyzedListener {}
)

override fun invoke(application: Application) {
Expand Down

0 comments on commit 80da4cd

Please sign in to comment.