[longomatch] Handle nulls in filters
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Handle nulls in filters
- Date: Sun, 18 Dec 2011 21:44:01 +0000 (UTC)
commit f3d5ca1d9117bd9950932f4a4d737bdbf78668fb
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Dec 16 02:44:38 2011 +0100
Handle nulls in filters
LongoMatch.GUI/Gui/GUIToolkit.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index 9d39b5c..e05f0c3 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -291,10 +291,12 @@ namespace LongoMatch.Gui
fChooser.SetCurrentFolder(defaultFolder);
if (defaultName != null)
fChooser.SetFilename(defaultName);
- filter = new FileFilter();
- filter.Name = filterName;
- filter.AddPattern(extensionFilter);
- fChooser.AddFilter(filter);
+ if (filterName != null) {
+ filter = new FileFilter();
+ filter.Name = filterName;
+ filter.AddPattern(extensionFilter);
+ fChooser.AddFilter(filter);
+ }
if (fChooser.Run() != (int)ResponseType.Accept)
path = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]