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

Commit cb3e1dd8 authored by Steve Kondik's avatar Steve Kondik
Browse files

hwui: Fix a sporadic crash seen during CTS runs

 * It's possible (due to race conditions) that a patch might be
   scheduled for removal twice. Just print a warning and continue
   instead of asserting and crashing.

Change-Id: I42865f6717816a743cc49ba15b839e6c3b57ed83
(cherry picked from commit ddc230ea)
parent 6fcc98be
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -128,10 +128,13 @@ void PatchCache::removeDeferred(Res_png_9patch* patch) {
            break;
        }
    }
    LOG_ALWAYS_FATAL_IF(patch == NULL);

    if (patch == NULL) {
        ALOGE("9-patch is already garbage, skipping");
    } else {
        mGarbage.push(patch);
    }
}

void PatchCache::clearGarbage() {
    Vector<patch_pair_t> patchesToRemove;