From 1474f8864faafebc92ff79959bb5c698bd29b704 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 8 Sep 2014 18:59:09 -0700 Subject: Don't check if this == NULL. Entering a method with this == NULL is undefined behavior. Clang whines about this. Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c --- libs/gui/LayerState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index acdbd77161..498953f2ed 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -75,7 +75,7 @@ status_t ComposerState::read(const Parcel& input) { status_t DisplayState::write(Parcel& output) const { output.writeStrongBinder(token); - output.writeStrongBinder(surface->asBinder()); + output.writeStrongBinder(surface != NULL ? surface->asBinder() : NULL); output.writeInt32(what); output.writeInt32(layerStack); output.writeInt32(orientation); -- cgit v1.2.3-59-g8ed1b