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

Commit 12f58910 authored by Steve Kondik's avatar Steve Kondik
Browse files

surfaceflinger: Fix crash when setting priority

 * If phase offsets aren't set, SFEventThread will be null. Fixit.

Change-Id: Ieb4917a2dea4ed5e214215a5ad192d9cf3b72072
parent ae1d7e2a
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -486,12 +486,13 @@ void SurfaceFlinger::init() {
    }

    // set SFEventThread to SCHED_FIFO to minimize jitter
    if (mSFEventThread != NULL) {
        struct sched_param param = {0};
        param.sched_priority = 1;
        if (sched_setscheduler(mSFEventThread->getTid(), SCHED_FIFO, &param) != 0) {
            ALOGE("Couldn't set SCHED_FIFO for SFEventThread");
        }

    }

    // Initialize the H/W composer object.  There may or may not be an
    // actual hardware composer underneath.