From 16bcfb0114cee8e2617f94a1eefab60849f10657 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Tue, 2 Aug 2011 17:23:40 +0200 Subject: [PATCH] Avoid a null pointer dereference Do not use deco pointer until we are sure it is not null. REVIEW: 102057 --- tools/decobenchmark/preview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/decobenchmark/preview.cpp b/tools/decobenchmark/preview.cpp index 36cfcd17ca..429cbd2f4b 100644 --- a/tools/decobenchmark/preview.cpp +++ b/tools/decobenchmark/preview.cpp @@ -115,11 +115,11 @@ bool KDecorationPreview::recreateDecoration() { delete deco; deco = m_plugin->createDecoration(bridge); - deco->init(); if (!deco) return false; + deco->init(); positionPreviews(); deco->widget()->show();