Commit 5d569956 authored by Alexandre Julliard's avatar Alexandre Julliard

wrc: Avoid a crash if a file didn't contain any resources.

parent 1eab4f2f
......@@ -386,15 +386,17 @@ resource_file
$1 = rsc;
/* Final statements before were done */
head = get_resource_head($1);
if (resource_top) /* append to existing resources */
if ((head = get_resource_head($1)) != NULL)
{
resource_t *tail = resource_top;
while (tail->next) tail = tail->next;
tail->next = head;
head->prev = tail;
if (resource_top) /* append to existing resources */
{
resource_t *tail = resource_top;
while (tail->next) tail = tail->next;
tail->next = head;
head->prev = tail;
}
else resource_top = head;
}
else resource_top = head;
sttres = NULL;
}
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment