From 456cec68d1a3808863a347635c62a557baf27471 Mon Sep 17 00:00:00 2001 From: mahlzeit Date: Thu, 13 May 2004 09:18:38 +0000 Subject: [PATCH] If a be_synth already existed, the BSynth constructor should delete it first. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7558 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/midi/Synth.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/kits/midi/Synth.cpp b/src/kits/midi/Synth.cpp index 757bbd15f6..c31f27e4cb 100644 --- a/src/kits/midi/Synth.cpp +++ b/src/kits/midi/Synth.cpp @@ -23,13 +23,15 @@ #include "debug.h" #include "Synth.h" -BSynth *be_synth = 0; +BSynth* be_synth = NULL; //------------------------------------------------------------------------------ BSynth::BSynth() { - UNIMPLEMENTED + /* not complete yet */ + + delete be_synth; be_synth = this; } @@ -37,7 +39,9 @@ BSynth::BSynth() BSynth::BSynth(synth_mode synth) { - UNIMPLEMENTED + /* not complete yet */ + + delete be_synth; be_synth = this; } @@ -45,8 +49,9 @@ BSynth::BSynth(synth_mode synth) BSynth::~BSynth() { - UNIMPLEMENTED - be_synth = 0; + /* not complete yet */ + + be_synth = NULL; } //------------------------------------------------------------------------------