From 58a7b100476b261fdeb22f91d2b043f8eee57f28 Mon Sep 17 00:00:00 2001 From: ericwa Date: Tue, 15 Oct 2013 04:21:45 +0000 Subject: [PATCH] * Source/GSThemeDrawing.m (-tabHeightForType:): Check for nil before calling -size on an NSImage, for systems where this corrupts the stack. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37231 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/GSThemeDrawing.m | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index ca4188c73..ce5bb8e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-14 Eric Wasylishen + + * Source/GSThemeDrawing.m (-tabHeightForType:): Check for nil + before calling -size on an NSImage, for systems where this + corrupts the stack. + 2013-10-14 Eric Wasylishen * Source/GSThemeDrawing.m: Change stepper drawing methods to use diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index aa6040cd4..91d5a61e5 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -2004,6 +2004,10 @@ typedef enum { - (CGFloat) tabHeightForType: (NSTabViewType)type { NSImage *img = [self imageForTabPart: GSTabUnSelectedLeft type: type]; + if (img == nil) + { + return 0; + } return [img size].height; }