Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 576c86f0 authored by Weilin Xu's avatar Weilin Xu Committed by Automerger Merge Worker
Browse files

Fix null pointer crash in AIDL radio HAL VTS am: cf892db1 am: e065f848

parents 3f7c7d55 e065f848
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -997,13 +997,12 @@ TEST_P(BroadcastRadioHalTest, SetConfigFlags) {
    LOG(DEBUG) << "SetConfigFlags Test";
    LOG(DEBUG) << "SetConfigFlags Test";


    auto get = [&](ConfigFlag flag) -> bool {
    auto get = [&](ConfigFlag flag) -> bool {
        bool* gotValue = nullptr;
        bool gotValue;


        auto halResult = mModule->isConfigFlagSet(flag, gotValue);
        auto halResult = mModule->isConfigFlagSet(flag, &gotValue);


        EXPECT_FALSE(gotValue == nullptr);
        EXPECT_TRUE(halResult.isOk());
        EXPECT_TRUE(halResult.isOk());
        return *gotValue;
        return gotValue;
    };
    };


    auto notSupportedError = resultToInt(Result::NOT_SUPPORTED);
    auto notSupportedError = resultToInt(Result::NOT_SUPPORTED);