From 7e61d4900d9b99958f863cd2f56fc3cd4e800600 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Jun 2012 21:56:45 +0000 Subject: memory crash fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@367 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/TopToolBar/main.cpp') diff --git a/plugins/TopToolBar/main.cpp b/plugins/TopToolBar/main.cpp index df441b85cb..18d6584e9e 100644 --- a/plugins/TopToolBar/main.cpp +++ b/plugins/TopToolBar/main.cpp @@ -137,14 +137,14 @@ int DBLoadButtonSettings(int butpos) Buttons[butpos].dwFlags |= TTBBF_VISIBLE; Buttons[butpos].UserDefinedbmDown = DBGetStringT(0, TTB_OPTDIR, AS(buf, Buttons[butpos].name, "_BmpDown")); - if ((Buttons[butpos].UserDefinedbmDown != NULL) && *Buttons[butpos].UserDefinedbmDown == 0) { - free(Buttons[butpos].UserDefinedbmDown); + if ( Buttons[butpos].UserDefinedbmDown != NULL && Buttons[butpos].UserDefinedbmDown[0] == 0) { + mir_free(Buttons[butpos].UserDefinedbmDown); Buttons[butpos].UserDefinedbmDown = NULL; } Buttons[butpos].UserDefinedbmUp = DBGetStringT(0, TTB_OPTDIR, AS(buf, Buttons[butpos].name, "_BmpUp")); - if ((Buttons[butpos].UserDefinedbmUp != NULL) && *Buttons[butpos].UserDefinedbmUp == 0) { - free(Buttons[butpos].UserDefinedbmUp); + if ( Buttons[butpos].UserDefinedbmUp != NULL && Buttons[butpos].UserDefinedbmUp[0] == 0) { + mir_free(Buttons[butpos].UserDefinedbmUp); Buttons[butpos].UserDefinedbmUp = NULL; } return 0; -- cgit v1.2.3