From b99287bef5bf8c71ef5b0aeb7de85a069b222443 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 23 Mar 2009 15:01:05 -0700 Subject: Minor code cleanup Improve readability of code. Reviewed-by: Tom Cooksey --- src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp index ab1d0f1..7d5ad10 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp @@ -126,14 +126,15 @@ void QDirectFBSurface::setGeometry(const QRect &rect, const QRegion &mask) // If we're in a resize, the surface shouldn't be locked Q_ASSERT( (lockedImage == 0) || (isResize == false)); - IDirectFBSurface *s = screen->dfbSurface(); - if (onscreen && s) { + if (onscreen) { if (dfbSurface) dfbSurface->Release(dfbSurface); DFBRectangle r = { rect.x(), rect.y(), rect.width(), rect.height() }; - result = s->GetSubSurface(s, &r, &dfbSurface); + IDirectFBSurface *primarySurface = screen->dfbSurface(); + Q_ASSERT(primarySurface); + result = primarySurface->GetSubSurface(primarySurface, &r, &dfbSurface); } else { #ifdef QT_NO_DIRECTFB_WM if (isResize) { -- cgit v0.12