summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2010-02-24 14:12:11 -0800
committerAnders Bakken <anders.bakken@nokia.com>2010-02-24 14:17:00 -0800
commit4ae8ab9d7ce2cde5c798f13a7bccf05976eb5d54 (patch)
tree80db52f17eacb96bcaebcd50fcda403adba827e4 /src/plugins
parentdda020241665f895ff4587ca6a08b7bf65c046bf (diff)
Initialize mem to 0
If DirectFB fails to lock a surface it won't necessarily set mem to 0. Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index ff997c01db..cffd4e346f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1680,7 +1680,7 @@ bool QDirectFBScreen::initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *d
uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl)
{
- void *mem;
+ void *mem = 0;
const DFBResult result = surface->Lock(surface, flags, &mem, bpl);
if (result != DFB_OK) {
DirectFBError("QDirectFBScreen::lockSurface()", result);