mshtml: Fix crash because of usage of pointer before cheking if it is NULL
Peter Dons Tychsen (none)
donpedro at donpedro.
Tue Sep 1 21:16:19 CDT 2009
---
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();
--
1.6.2.5
--=-rM86h9NbrNuNwQ934rww--
More information about the wine-patches
mailing list