Avoid a null pointer dereference

Do not use deco pointer until we are sure it is not null.

REVIEW: 102057
This commit is contained in:
Jaime Torres 2011-08-02 17:23:40 +02:00
parent 664aaa1b60
commit 16bcfb0114

View file

@ -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();