uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp
changeset 40 dd05fdd05078
parent 19 f5bac0badc7e
child 46 180438f24a1e
equal deleted inserted replaced
38:69409653e863 40:dd05fdd05078
    88 // Creates plugin.
    88 // Creates plugin.
    89 // -----------------------------------------------------------------------------
    89 // -----------------------------------------------------------------------------
    90 //
    90 //
    91 TAny* CreatePlugin()
    91 TAny* CreatePlugin()
    92     {
    92     {
    93     CAlfOogmMonitorPlugin* plugin = new(ELeave) CAlfOogmMonitorPlugin;
    93     CAlfOogmMonitorPlugin* plugin = new CAlfOogmMonitorPlugin;
    94     CleanupStack::PushL(plugin);
    94     if ( plugin )
    95     plugin->ConstructL();
    95         {
    96     CleanupStack::Pop(plugin);
    96         TRAPD( err, plugin->ConstructL() );
       
    97         if ( err != KErrNone )
       
    98             {
       
    99             delete plugin;
       
   100             plugin = NULL;
       
   101             }
       
   102         }
    97     return plugin;
   103     return plugin;
    98     }
   104     }
    99 
   105 
   100 // -----------------------------------------------------------------------------
   106 // -----------------------------------------------------------------------------
   101 // Implementation table for plugin.
   107 // Implementation table for plugin.