uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp
branchRCL_3
changeset 17 c9d868f1e20c
parent 8 46927d61fef3
child 18 1801340c26a2
--- 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;
     }