am 006a601f
: Fix reading NULL Surfaces from Parcels
* commit '006a601f22b275bcabf608f630b321df027d56d1': Fix reading NULL Surfaces from Parcels
This commit is contained in:
commit
54a1faa7ca
@ -735,7 +735,7 @@ status_t Surface::writeToParcel(
|
||||
sp<Surface> Surface::readFromParcel(const Parcel& data) {
|
||||
sp<IBinder> binder(data.readStrongBinder());
|
||||
sp<IGraphicBufferProducer> bp(interface_cast<IGraphicBufferProducer>(binder));
|
||||
return new Surface(bp);
|
||||
return bp != NULL ? new Surface(bp): NULL;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user