diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-11-23 11:17:48 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-23 11:17:48 -0800 |
commit | 39154dfb87f9595a5b0fdc61989b5be0c02b805e (patch) | |
tree | 54edadb04ac27c308b3f058e7ea11f3df6231858 /libs/ui | |
parent | a8f84063ff943cbd658e4e3ae575de2d1e110b93 (diff) | |
parent | 9df7f31359866a77a47c9fab3171c71715fd0056 (diff) | |
download | frameworks_base-39154dfb87f9595a5b0fdc61989b5be0c02b805e.zip frameworks_base-39154dfb87f9595a5b0fdc61989b5be0c02b805e.tar.gz frameworks_base-39154dfb87f9595a5b0fdc61989b5be0c02b805e.tar.bz2 |
am 9df7f313: am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an error"
* commit '9df7f31359866a77a47c9fab3171c71715fd0056':
frameworks/base: Destroy the overlay even if there is an error
Diffstat (limited to 'libs/ui')
-rw-r--r-- | libs/ui/Overlay.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/ui/Overlay.cpp b/libs/ui/Overlay.cpp index 3aa8950..b082c53 100644 --- a/libs/ui/Overlay.cpp +++ b/libs/ui/Overlay.cpp @@ -96,7 +96,6 @@ void* Overlay::getBufferAddress(overlay_buffer_t buffer) } void Overlay::destroy() { - if (mStatus != NO_ERROR) return; // Must delete the objects in reverse creation order, thus the // data side must be closed first and then the destroy send to @@ -104,9 +103,15 @@ void Overlay::destroy() { if (mOverlayData) { overlay_data_close(mOverlayData); mOverlayData = NULL; + } else { + LOGD("Overlay::destroy mOverlayData is NULL"); } - mOverlayRef->mOverlayChannel->destroy(); + if (mOverlayRef != 0) { + mOverlayRef->mOverlayChannel->destroy(); + } else { + LOGD("Overlay::destroy mOverlayRef is NULL"); + } } status_t Overlay::getStatus() const { |