diff options
| author | 2008-07-06 06:13:56 +0000 | |
|---|---|---|
| committer | 2008-07-06 06:13:56 +0000 | |
| commit | 50c5ee82e5c16967f3fc6575f0b1f623b53f3d15 (patch) | |
| tree | 1582d940c3d6db12acf68ade99e40b8cadffd70e | |
| parent | 161b2a86e8ea483e71a53eef086a42f9ef4ce610 (diff) | |
From: Jeff Shanholtz [mailto:jpublic@shanholtz.com]
Sent: Thursday, July 03, 2008 9:16 AM
To: submit@mamedev.org
Subject: fix for output.c unregister_client crash
My app is causing mame to crash when it unregisters itself as an output client.
Output.c's unregister_client() is guaranteed to crash because if it finds a
match then it ends up doing a "->next" twice -- once in the "if" body, and once
in the "for" statement. This patch to 0.125u8 fixes this problem. It simply adds
a "break" to the "if" body since at that point there is no need to continue.
Hope this can make it in for 0.126.
| -rw-r--r-- | src/osd/windows/output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osd/windows/output.c b/src/osd/windows/output.c index 57ca8161db3..ca52b8d1e5d 100644 --- a/src/osd/windows/output.c +++ b/src/osd/windows/output.c @@ -251,6 +251,7 @@ static LRESULT unregister_client(HWND hwnd, LPARAM id) *client = (*client)->next; free(temp); found = TRUE; + break; } // return an error if not found |
