diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index d71ca4047c..2f8eceb426 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -194,7 +194,8 @@ public: // avoid 'changed' events when setting the tab programmatically wxTabViewController* controller = [slf delegate]; [slf setDelegate:nil]; - [slf selectTabViewItemAtIndex:(value-1)]; + if ( value > 0 ) + [slf selectTabViewItemAtIndex:(value-1)]; [slf setDelegate:controller]; }