diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index 1adc134e4..60e25c147 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -95,7 +95,7 @@ status_t BnSurfaceComposerClient::onTransact( status_t result = createSurface(name, w, h, format, flags, &handle, &gbp); reply->writeStrongBinder(handle); - reply->writeStrongBinder(gbp->asBinder()); + reply->writeStrongBinder(gbp != NULL ? gbp->asBinder() : NULL); reply->writeInt32(result); return NO_ERROR; } break;