Mercurial > hg > xmms-sid
changeset 958:828dce1195e6
Oops, fix issues caused by previous changesets.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 20 Nov 2012 22:34:33 +0200 |
parents | 0e60e5d56fdd |
children | 32435407eb9c |
files | src/xs_sidplay2.cpp |
diffstat | 1 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xs_sidplay2.cpp Tue Nov 20 22:13:48 2012 +0200 +++ b/src/xs_sidplay2.cpp Tue Nov 20 22:34:33 2012 +0200 @@ -101,8 +101,7 @@ */ gboolean xs_sidplay2_init(XSEngineState * state) { - - + (void) state; return TRUE; } @@ -111,8 +110,6 @@ */ void xs_sidplay2_close(XSEngineState * state) { - XSSIDPlay2 *engine = (XSSIDPlay2 *) state->internal; - XSDEBUG("SIDPlay2 backend shutdown.\n"); xs_sidplay2_delete(state); @@ -327,9 +324,9 @@ if (rs) { engine->config.sidEmulation = rs; - if (!*rs) return FALSE; + if (!*rs) goto error; rs->create((engine->emu.info()).maxsids); - if (!*rs) return FALSE; + if (!*rs) goto error; } } break; @@ -346,7 +343,7 @@ if (!*hs) { xs_error("hardSID->create() failed.\n"); - return FALSE; + goto error; } } } @@ -355,13 +352,13 @@ default: xs_error("[SIDPlay2] Invalid or unsupported builder selected.\n"); - return FALSE; + goto error; } if (!engine->config.sidEmulation) { xs_error("[SIDPlay2] Could not initialize SIDBuilder object.\n"); - return FALSE; + goto error; } XSDEBUG("%s\n", engine->config.sidEmulation->credits()); @@ -378,11 +375,15 @@ goto error; } - res = TRUE; + g_free(buf); + return TRUE; error: + if (engine) + delete engine; + state->internal = NULL; g_free(buf); - return res; + return FALSE; }