Peter Dons Tychsen : mshtml: Fix crash because of usage of pointer before cheking if it is NULL.
Alexandre Julliard
julliard at winehq.org
Tue Sep 8 08:54:07 CDT 2009
Module: wine
Branch: master
Commit: 7c1ae274438b62f1be2ffe9cb0fc840a5d84a0db
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7c1ae274438b62f1be2ffe9cb0fc840a5d84a0db
Author: Peter Dons Tychsen <donpedro at tdcadsl.dk>
Date: Wed Sep 2 04:16:19 2009 +0200
mshtml: Fix crash because of usage of pointer before cheking if it is NULL.
---
dlls/mshtml/task.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c
index 496b96f..0759580 100644
--- a/dlls/mshtml/task.c
+++ b/dlls/mshtml/task.c
@@ -94,6 +94,9 @@ void remove_doc_tasks(const HTMLDocument *doc)
task_timer_t *timer;
task_t *iter, *tmp;
+ if(!thread_data)
+ return;
+
LIST_FOR_EACH_SAFE(liter, ltmp, &thread_data->timer_list) {
timer = LIST_ENTRY(liter, task_timer_t, entry);
if(timer->doc == doc)
@@ -105,9 +108,6 @@ void remove_doc_tasks(const HTMLDocument *doc)
SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL);
}
- if(!thread_data)
- return;
-
while(thread_data->task_queue_head
&& thread_data->task_queue_head->doc == doc)
pop_task();
More information about the wine-cvs
mailing list