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

Commit ecb6fdda authored by Gabriele M's avatar Gabriele M Committed by Steve Kondik
Browse files

PowerManager: don't pass NULL pointers to power HAL

Sending a NULL pointer here is likely going to cause system crashes and
doesn't seem to be the correct thing to do, a value equals to zero is
no different from the others.

Change-Id: I2678387715b3ec1d12627abe2dd5d3e189579dc4
parent 52782aa4
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -148,11 +148,7 @@ static void nativeSendPowerHint(JNIEnv *env, jclass clazz, jint hintId, jint dat
    int data_param = data;

    if (gPowerModule && gPowerModule->powerHint) {
        if(data)
        gPowerModule->powerHint(gPowerModule, (power_hint_t)hintId, &data_param);
        else {
            gPowerModule->powerHint(gPowerModule, (power_hint_t)hintId, NULL);
        }
    }
}