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

Commit 388e968a authored by Hridya Valsaraju's avatar Hridya Valsaraju
Browse files

Fix bug in error checking in GnssLocationProvider

Needed to check if gnssNiIface was a nullptr
before calling setCallback on it.

Bug: 36052760
Test: make
Change-Id: I4d725bd30310353fb7d248f9bf247ac55f94c765
parent f6423ba1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1175,7 +1175,7 @@ static jboolean android_location_GnssLocationProvider_init(JNIEnv* env, jobject
    }

    sp<IGnssNiCallback> gnssNiCbIface = new GnssNiCallback();
    if (gnssNiCbIface != nullptr) {
    if (gnssNiIface != nullptr) {
        gnssNiIface->setCallback(gnssNiCbIface);
    } else {
        ALOGE("Unable to initialize GNSS NI interface\n");