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

Commit 7c7ea3a9 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "Don\'t flatten nullptrs" into nyc-dev am: 55e5cc0e

am: 5f309cac

* commit '5f309cac':
  Don't flatten nullptrs

Change-Id: I345281a4a791e1bb7e27eb48c97e68e8f127f1b6
parents 6d5fd2a4 5f309cac
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -395,8 +395,12 @@ public:
        if (result != NO_ERROR) {
            return result;
        }
        sp<GraphicBuffer> buffer(new GraphicBuffer);
        bool hasBuffer = reply.readBool();
        sp<GraphicBuffer> buffer;
        if (hasBuffer) {
            buffer = new GraphicBuffer();
            result = reply.read(*buffer);
        }
        if (result != NO_ERROR) {
            ALOGE("getLastQueuedBuffer failed to read buffer: %d", result);
            return result;
@@ -631,7 +635,12 @@ status_t BnGraphicBufferProducer::onTransact(
            if (result != NO_ERROR) {
                return result;
            }
            if (!buffer.get()) {
                reply->writeBool(false);
            } else {
                reply->writeBool(true);
                result = reply->write(*buffer);
            }
            if (result != NO_ERROR) {
                ALOGE("getLastQueuedBuffer failed to write buffer: %d", result);
                return result;