diff -r cd0ae4656946 -r c9d868f1e20c uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp --- a/uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp Mon Jun 21 16:41:52 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp Thu Jul 15 19:40:07 2010 +0300 @@ -90,10 +90,16 @@ // TAny* CreatePlugin() { - CAlfOogmMonitorPlugin* plugin = new(ELeave) CAlfOogmMonitorPlugin; - CleanupStack::PushL(plugin); - plugin->ConstructL(); - CleanupStack::Pop(plugin); + CAlfOogmMonitorPlugin* plugin = new CAlfOogmMonitorPlugin; + if ( plugin ) + { + TRAPD( err, plugin->ConstructL() ); + if ( err != KErrNone ) + { + delete plugin; + plugin = NULL; + } + } return plugin; }