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

Commit 6a04e5fc authored by Dan Stoza's avatar Dan Stoza
Browse files

libgui: Propagate error by clearing sp<GB>

Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there
is an error during unflattening.

Bug: 21498231
Change-Id: I886da4474fc06853cc59188d62044b7d7549126b
parent f6f221aa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ public:
        if (result == NO_ERROR) {
            graphicBuffer = new GraphicBuffer();
            result = reply.read(*graphicBuffer);
            if (result != NO_ERROR) {
                graphicBuffer.clear();
            }
            // reply.readStrongBinder();
            // here we don't even have to read the BufferReference from
            // the parcel, it'll die with the parcel.