diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-11-23 11:14:57 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-23 11:14:57 -0800 |
commit | ec756056abceb3c5ffe77174cf38328b9fcc1b75 (patch) | |
tree | 1828739c054617c3bfa5cb08c15e109c60faa99b /libs/ui | |
parent | 8cec9559633f0cbd01ee5da2766919520f2f02c6 (diff) | |
parent | 4e8fa27b4e46186f1c017b37777f17594b34d45d (diff) | |
download | frameworks_native-ec756056abceb3c5ffe77174cf38328b9fcc1b75.zip frameworks_native-ec756056abceb3c5ffe77174cf38328b9fcc1b75.tar.gz frameworks_native-ec756056abceb3c5ffe77174cf38328b9fcc1b75.tar.bz2 |
am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an error"
* commit 'f0f6c54b13831b11bd7a3bd7a01dc49b7505e56e':
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 { |