diff --git a/ChangeLog b/ChangeLog index 37d0e153b..cf71e7b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-08 Richard Frith-Macdonald + + * Source/GSTheme.m: Fix nil pointer exception. + 2009-01-07 Fred Kiefer * Source/NSWindow+Toolbar.m, diff --git a/Headers/Additions/GNUstepGUI/GSTheme.h b/Headers/Additions/GNUstepGUI/GSTheme.h index 266d805ef..6076c46bc 100644 --- a/Headers/Additions/GNUstepGUI/GSTheme.h +++ b/Headers/Additions/GNUstepGUI/GSTheme.h @@ -442,7 +442,7 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification; /** * Returns the tile image information for a particular image name, - * or nil if there is no such information.
+ * or nil if there is no such information or the name is nil.
* The GUI library uses this internally to handling tiling of image * information to draw user interface elements. The tile information * returned by this method can be passed to the diff --git a/Source/GSTheme.m b/Source/GSTheme.m index dd48b6a4d..7a36624e2 100644 --- a/Source/GSTheme.m +++ b/Source/GSTheme.m @@ -654,6 +654,10 @@ typedef struct { GSDrawTiles *tiles; NSMutableDictionary *cache; + if (aName == nil) + { + return nil; + } switch (elementState) { case GSThemeNormalState: