tomboy r1751 - in trunk: . Tomboy



Author: sharm
Date: Tue Jan  8 14:53:05 2008
New Revision: 1751
URL: http://svn.gnome.org/viewvc/tomboy?rev=1751&view=rev

Log:
* Tomboy/NoteTag.cs: Put in some print code to debug a null reference
  exception (see bug #508064).  Attempting to handle a null
  GtkTextView style by returning white as the background color.

Modified:
   trunk/ChangeLog
   trunk/Tomboy/NoteTag.cs

Modified: trunk/Tomboy/NoteTag.cs
==============================================================================
--- trunk/Tomboy/NoteTag.cs	(original)
+++ trunk/Tomboy/NoteTag.cs	Tue Jan  8 14:53:05 2008
@@ -346,7 +346,12 @@
 
 			Gtk.Style s = Gtk.Rc.GetStyleByPaths(Gtk.Settings.Default,
 			                                     "GtkTextView", "GtkTextView", Gtk.TextView.GType);
-			return s.Background(Gtk.StateType.Normal);
+			if (s == null) {
+				Logger.Debug ("get_background: Style for GtkTextView came back null! Returning white...");
+				return new Gdk.Color (0xff, 0xff, 0xff); //white, for lack of a better idea
+			}
+			else
+				return s.Background(Gtk.StateType.Normal);
 		}
 
 		Gdk.Color render_foreground(PaletteColor symbol)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]