Mercurial > hg > xmms-sid
comparison src/xs_sidplay2.cc @ 775:0e9f2894b0a9
Proper order of freeing/deletion.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 06 Nov 2012 11:56:55 +0200 |
parents | d09d5c852b7e |
children | bb7b3ded919a |
comparison
equal
deleted
inserted
replaced
774:d09d5c852b7e | 775:0e9f2894b0a9 |
---|---|
420 */ | 420 */ |
421 void xs_sidplay2_close(XSEngineState * state) | 421 void xs_sidplay2_close(XSEngineState * state) |
422 { | 422 { |
423 XSSIDPlay2 *engine = (XSSIDPlay2 *) state->internal; | 423 XSSIDPlay2 *engine = (XSSIDPlay2 *) state->internal; |
424 | 424 |
425 xs_sidplay2_delete(state); | |
426 | |
425 if (engine) | 427 if (engine) |
426 { | 428 { |
427 #ifdef HAVE_SIDPLAY2_FP | 429 #ifdef HAVE_SIDPLAY2_FP |
428 if (engine->config.sidEmulation) | 430 if (engine->config.sidEmulation) |
429 { | 431 { |
433 delete builder; | 435 delete builder; |
434 } | 436 } |
435 #endif | 437 #endif |
436 | 438 |
437 delete engine; | 439 delete engine; |
438 } | 440 engine = NULL; |
439 | 441 } |
440 xs_sidplay2_delete(state); | 442 |
441 state->internal = NULL; | 443 state->internal = NULL; |
442 } | 444 } |
443 | 445 |
444 | 446 |
445 /* Initialize current song and sub-tune | 447 /* Initialize current song and sub-tune |