aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/objects/KvsObject_window.cpp
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2011-02-21 23:46:03 +0000
committerGravatar Szymon Tomasz Stefanek2011-02-21 23:46:03 +0000
commit3aa8783cf40bfb9e5759cee86bd734df645b153e (patch)
tree695ee7b834045ccfb5b0b69fc21678a768a4d0a2 /src/modules/objects/KvsObject_window.cpp
parentUpdate the po files (diff)
downloadKVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.tar.gz
KVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.tar.bz2
KVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.zip
More memory leak hunting
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5501 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/KvsObject_window.cpp')
-rw-r--r--src/modules/objects/KvsObject_window.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/objects/KvsObject_window.cpp b/src/modules/objects/KvsObject_window.cpp
index 603c1bd04..f3b741481 100644
--- a/src/modules/objects/KvsObject_window.cpp
+++ b/src/modules/objects/KvsObject_window.cpp
@@ -113,12 +113,13 @@ KVSO_END_CONSTRUCTOR(KvsObject_window)
KVSO_BEGIN_DESTRUCTOR(KvsObject_window)
-
+ if(widget())
+ g_pMainWindow->closeWindow(((KviKvsScriptWindowWindow *)widget()));
KVSO_END_CONSTRUCTOR(KvsObject_window)
bool KvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *)
{
- KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),getName());
+ KviKvsScriptWindowWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),getName());
setObject(w);
pContext->window()->frame()->addWindow(w,false);
w->minimize(); // must be minimized before children are added, otherwise the focus handling goes nuts...