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

Commit b0159483 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

SF: Fix initialization error when starting a traces

Make sure mWhere is always initialized

Test: start and stop sf trace

Fixes: 128851228
Change-Id: I82b8d195a33a50ad28a78392372b7e72479ef9f8
parent 6b243887
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ void SurfaceTracing::traceLayers(const char* where) {


void SurfaceTracing::notify(const char* where) {
void SurfaceTracing::notify(const char* where) {
    std::lock_guard<std::mutex> sfLock(mFlinger.mDrawingStateLock);
    std::lock_guard<std::mutex> sfLock(mFlinger.mDrawingStateLock);
    mWhere = strdup(where);
    mWhere = where;
    mConditionalVariable.notify_one();
    mConditionalVariable.notify_one();
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,7 @@ private:


    const SurfaceFlinger& mFlinger;
    const SurfaceFlinger& mFlinger;


    char* mWhere;
    const char* mWhere = "";
    status_t mLastErr = NO_ERROR;
    status_t mLastErr = NO_ERROR;
    std::thread mThread;
    std::thread mThread;
    std::condition_variable mConditionalVariable;
    std::condition_variable mConditionalVariable;