Revision: 21621 http://sourceforge.net/p/bibdesk/svn/21621 Author: hofman Date: 2017-11-22 10:35:53 +0000 (Wed, 22 Nov 2017) Log Message: ----------- Make sure button added is not nil, and make sure we add a button, to cite key warning
Modified Paths: -------------- trunk/bibdesk/BDSKEditor.m Modified: trunk/bibdesk/BDSKEditor.m =================================================================== --- trunk/bibdesk/BDSKEditor.m 2017-11-20 17:08:08 UTC (rev 21620) +++ trunk/bibdesk/BDSKEditor.m 2017-11-22 10:35:53 UTC (rev 21621) @@ -2114,6 +2114,7 @@ message = NSLocalizedString(@"An item cannot cross reference to itself.", @"Informative text in alert dialog"); else if (errorCode != BDSKNoCrossrefError) // shouldn't happen message = NSLocalizedString(@"Cannot set this cite key as this would lead to a crossreff chain.", @"Informative text in alert dialog"); + defaultButton = NSLocalizedString(@"OK", @"Button title"); } if (message) { @@ -2120,8 +2121,8 @@ NSAlert *alert = [[[NSAlert alloc] init] autorelease]; [alert setMessageText:NSLocalizedString(@"Invalid Value", @"Message in alert dialog when entering an invalid value")]; [alert setInformativeText:message]; - [alert addButtonWithTitle:defaultButton]; - [alert addButtonWithTitle:cancelButton]; + if (defaultButton) [alert addButtonWithTitle:defaultButton]; + if (cancelButton) [alert addButtonWithTitle:cancelButton]; NSInteger rv = [alert runModal]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit