summaryrefslogtreecommitdiff
path: root/libs/gui/Surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/Surface.cpp')
-rw-r--r--libs/gui/Surface.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 7b2b5c37f1..5bee7a41f6 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -153,7 +153,10 @@ status_t Surface::getDisplayRefreshCycleDuration(nsecs_t* outRefreshDuration) {
ATRACE_CALL();
DisplayStatInfo stats;
- status_t err = composerService()->getDisplayStats(NULL, &stats);
+ status_t result = composerService()->getDisplayStats(NULL, &stats);
+ if (result != NO_ERROR) {
+ return result;
+ }
*outRefreshDuration = stats.vsyncPeriod;