Fixed a bug for unregistering app

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8994 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-09-02 07:46:02 +00:00
parent 00319859a6
commit 578d3d6b6e

View file

@ -89,14 +89,14 @@ _xe_base = {
* @brief Unregister an application instance
*/
unregisterApp : function(oApp) {
var sName = oPlugin.getName().toLowerCase();
var sName = oApp.getName().toLowerCase();
var nIndex = $.inArray(oApp, _apps);
if (nIndex >= 0) _apps.splice(nIndex, 1);
if (nIndex >= 0) _apps = _apps.splice(nIndex, 1);
if ($.isArray(_apps[sName])) {
nIndex = $.inArray(oApp, _apps[sName]);
if (nIndex >= 0) _apps[sName].splice(nIndex, 1);
if (nIndex >= 0) _apps[sName] = _apps[sName].splice(nIndex, 1);
}
// unregister event