summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools.c b/tools.c
index 06cfd34..f027a8f 100644
--- a/tools.c
+++ b/tools.c
@@ -15,9 +15,10 @@ cDirList::cDirList(cImageList &ImageList)
cTokenizer *token = new cTokenizer(ImageList.GetDirContains(), "@");
for(int i = 1; i <= token->Count(); i++)
{
- asprintf(&buffer, "^%s$", token->GetToken(i));
- OptExclude(buffer);
- FREENULL(buffer);
+ if(0 < asprintf(&buffer, "^%s$", token->GetToken(i))) {
+ OptExclude(buffer);
+ FREENULL(buffer);
+ }
}
OptSort((eFileList)DVDSwitchSetup.SortMode);