summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Scott Stone <tafoid@users.noreply.github.com>2011-11-29 19:20:25 +0000
committer Scott Stone <tafoid@users.noreply.github.com>2011-11-29 19:20:25 +0000
commit5bceba7caab9bdc39f2372a1f7fa41870426c870 (patch)
treebf6f7a705c4393c616c0ff908c13f7992cf84cf3
parent02203fedfa63a97b93be754d3e0d820e01f6bd9f (diff)
Moved a condition check (tex->d3dtex == tex->d3dfinaltex) to happen before one of them was set to NULL (tex->d3dfinaltex). Fixes MT Bug #4538. [Antonio Giner]
-rw-r--r--src/osd/windows/drawd3d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 41245e70906..87c61e6addc 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -922,10 +922,11 @@ static void device_delete_resources(d3d_info *d3d)
d3d->texlist = tex->next;
if (tex->d3dfinaltex != NULL)
{
+ if (tex->d3dtex == tex->d3dfinaltex) tex->d3dtex = NULL;
(*d3dintf->texture.release)(tex->d3dfinaltex);
tex->d3dfinaltex = NULL;
}
- if (tex->d3dtex != NULL && tex->d3dtex != tex->d3dfinaltex)
+ if (tex->d3dtex != NULL)
{
(*d3dintf->texture.release)(tex->d3dtex);
tex->d3dtex = NULL;