diff options
| author | 2024-08-14 17:31:58 -0700 | |
|---|---|---|
| committer | 2024-08-14 17:51:03 -0700 | |
| commit | c0ca5056abcc441115935a359c22e2f8d4a89c9a (patch) | |
| tree | dc61062d2d865d341b5253b0bda7e6eac9a878c8 | |
| parent | 08b606153943332075a202450162b02f3eea523a (diff) | |
Check that the DeapexerInfo was actually set
Otherwise we could return empty DeapexerInfos. We're not running into
any problems due to this at the moment, it's just something I noticed.
Bug: None
Test: m nothing --no-skip-soong-tests
Change-Id: I903d86740a9f22574a5f6bf2effa912bd8237ab6
| -rw-r--r-- | android/deapexer.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/deapexer.go b/android/deapexer.go index 61ae64ea5..dcae3e46d 100644 --- a/android/deapexer.go +++ b/android/deapexer.go @@ -181,7 +181,11 @@ func FindDeapexerProviderForModule(ctx ModuleContext) (*DeapexerInfo, error) { // An err has been found. Do not visit further. return } - c, _ := OtherModuleProvider(ctx, m, DeapexerProvider) + c, ok := OtherModuleProvider(ctx, m, DeapexerProvider) + if !ok { + ctx.ModuleErrorf("Expected all deps with DeapexerTag to have a DeapexerProvider, but module %q did not", m.Name()) + return + } p := &c if di != nil { // If two DeapexerInfo providers have been found then check if they are |