mshtml: Fix crash because of usage of pointer before cheking if it is NULL.

This commit is contained in:
Peter Dons Tychsen 2009-09-02 04:16:19 +02:00 committed by Alexandre Julliard
parent aef202507b
commit 7c1ae27443

View file

@ -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();