Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoei Erez <roeie@mono-cvs.ximian.com>2007-09-10 14:33:22 +0400
committerRoei Erez <roeie@mono-cvs.ximian.com>2007-09-10 14:33:22 +0400
commit0e75b3e2af75155d5d30f78809fb4c8ea7ad72e7 (patch)
treeee1a66b2b7d1e5ebfc6f2045dbcf2fbe2d110148 /mcs/class/System/System.Diagnostics/TraceListener.cs
parentfec737547ee553a7100287a4d5c637d8eb8aa9ab (diff)
fix NullPointerException when TraceOptions is not initialized
svn path=/trunk/mcs/; revision=85558
Diffstat (limited to 'mcs/class/System/System.Diagnostics/TraceListener.cs')
-rw-r--r--mcs/class/System/System.Diagnostics/TraceListener.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/mcs/class/System/System.Diagnostics/TraceListener.cs b/mcs/class/System/System.Diagnostics/TraceListener.cs
index e91e2e4166c..ec83065bea4 100644
--- a/mcs/class/System/System.Diagnostics/TraceListener.cs
+++ b/mcs/class/System/System.Diagnostics/TraceListener.cs
@@ -81,8 +81,13 @@ namespace System.Diagnostics {
set { System.Threading.Thread.SetData (_filterStore, value); }
}
- private TraceOptions options {
- get { return (TraceOptions) System.Threading.Thread.GetData (_optionsStore); }
+ private TraceOptions options {
+ get {
+ object o = System.Threading.Thread.GetData (_optionsStore);
+ if (o == null)
+ return TraceOptions.None;
+ return (TraceOptions) o;
+ }
set { System.Threading.Thread.SetData (_optionsStore, value); }
}
#endif