summaryrefslogtreecommitdiffstats
path: root/libs/ui
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2009-09-23 10:54:36 -0700
committerMarco Nelissen <marcone@google.com>2009-09-23 10:56:51 -0700
commite613468402544b3dff735ac1311a2864a6660f4a (patch)
tree4b2b634a7bf1cdc6e00e4adb4b56d8eaee983cf3 /libs/ui
parent585c67f70f18b8879ced854c5865141d6c650cd8 (diff)
downloadframeworks_base-e613468402544b3dff735ac1311a2864a6660f4a.zip
frameworks_base-e613468402544b3dff735ac1311a2864a6660f4a.tar.gz
frameworks_base-e613468402544b3dff735ac1311a2864a6660f4a.tar.bz2
fbDev wasn't initialized of hw_get_module failed, but was then used anyway.
Diffstat (limited to 'libs/ui')
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index fc2e2f6..c5e22e5 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -117,15 +117,17 @@ FramebufferNativeWindow::FramebufferNativeWindow()
LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
fbDev->width, fbDev->height, strerror(-err));
- }
- const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags;
- const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
- const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
- const_cast<int&>(android_native_window_t::minSwapInterval) =
- fbDev->minSwapInterval;
- const_cast<int&>(android_native_window_t::maxSwapInterval) =
- fbDev->maxSwapInterval;
+ const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags;
+ const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
+ const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
+ const_cast<int&>(android_native_window_t::minSwapInterval) =
+ fbDev->minSwapInterval;
+ const_cast<int&>(android_native_window_t::maxSwapInterval) =
+ fbDev->maxSwapInterval;
+ } else {
+ LOGE("Couldn't get gralloc module");
+ }
android_native_window_t::setSwapInterval = setSwapInterval;
android_native_window_t::dequeueBuffer = dequeueBuffer;