From cc497be070a8b067625080bf3920c79bb168e272 Mon Sep 17 00:00:00 2001
From: Alexey Kulakov <panda75@bk.ru>
Date: Sun, 2 Feb 2014 14:36:54 +0000
Subject: mRadio: proxy fix - Bass don't make copy

git-svn-id: http://svn.miranda-ng.org/main/trunk@8014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/mRadio/rbass.pas | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'plugins')

diff --git a/plugins/mRadio/rbass.pas b/plugins/mRadio/rbass.pas
index c641dc6194..42bc4ffe62 100644
--- a/plugins/mRadio/rbass.pas
+++ b/plugins/mRadio/rbass.pas
@@ -48,6 +48,8 @@ var
   syncEND:HSYNC;
   SaveHeader:bool;
 
+const
+  proxy:pAnsiChar = nil;
 const
   hRecord:THANDLE = 0;
 
@@ -278,6 +280,8 @@ begin
   MyFreeBASS;
   if BassStatus=rbs_load then
   begin
+    mFreeMem(Proxy);
+
     BASS_PluginFree(0);
     Unload_BASSDLL;
 
@@ -409,8 +413,6 @@ begin
 end;
 
 function CheckBassStatus:bool;
-var
-  proxy:pAnsiChar;
 begin
   if BassStatus=rbs_null then
     MyLoadBass;
@@ -419,9 +421,9 @@ begin
   begin
     SetBassConfig;
 
+    mFreeMem(Proxy);
     proxy:=GetProxy(hNetLib);
     BASS_SetConfigPtr(BASS_CONFIG_NET_PROXY,proxy);
-    mFreeMem(proxy);
   end;
 
   if BassStatus=rbs_load then
-- 
cgit v1.2.3