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

Commit a8cbd474 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "libui: improve Region::validate"

parents 3c20b55c b420b583
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -513,6 +513,12 @@ void Region::rasterizer::flushSpan()

bool Region::validate(const Region& reg, const char* name, bool silent)
{
    if (reg.mStorage.isEmpty()) {
        ALOGE_IF(!silent, "%s: mStorage is empty, which is never valid", name);
        // return immediately as the code below assumes mStorage is non-empty
        return false;
    }

    bool result = true;
    const_iterator cur = reg.begin();
    const_iterator const tail = reg.end();