From 7e7e4258cfac7e4d0411d078372882b48fb9f039 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 15 May 2003 09:49:25 +0000 Subject: [PATCH] Patch level : 2.0 nopatch Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Evitata distruzione di timer con ID=0 git-svn-id: svn://10.65.10.50/trunk@11133 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvaga.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 70a414b52..8569fd830 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -3665,14 +3665,17 @@ long xvt_timer_create(WINDOW win, long interval) void xvt_timer_destroy(long id) { - CAST_TWIN(id, w); - wxTimer*& t = w._timer; - if (t != NULL) - { - t->Stop(); - delete t; - t = NULL; - } + if (id > 0L) + { + CAST_TWIN(id, w); + wxTimer*& t = w._timer; + if (t != NULL) + { + t->Stop(); + delete t; + t = NULL; + } + } } /////////////////////////////////////////////////////////// @@ -3879,7 +3882,7 @@ void xvt_vobj_move(WINDOW win, RCT *rctp) { CAST_WIN(win, w); wxRect rct = NormalizeRCT(rctp); - w.Move(rctp->left, rctp->top); + w.Move(rct.x, rct.y); w.SetClientSize(rct.width, rct.height); }