mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
macOS: Fix crash in startup window when no game data is found.
git-svn-id: https://svn.eduke32.com/eduke32@6448 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c07e705c48
commit
36eb156d7d
1 changed files with 9 additions and 5 deletions
|
@ -527,14 +527,18 @@ static struct {
|
|||
[[gameList documentView] setDataSource:gamelistsrc];
|
||||
[[gameList documentView] deselectAll:nil];
|
||||
|
||||
int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];
|
||||
if (row >= 0) {
|
||||
[[gameList documentView] scrollRowToVisible:row];
|
||||
if (settings.grp)
|
||||
{
|
||||
int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];
|
||||
if (row >= 0)
|
||||
{
|
||||
[[gameList documentView] scrollRowToVisible:row];
|
||||
#if defined MAC_OS_X_VERSION_10_3 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
|
||||
[[gameList documentView] selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
[[gameList documentView] selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
#else
|
||||
[[gameList documentView] selectRow:row byExtendingSelection:NO];
|
||||
[[gameList documentView] selectRow:row byExtendingSelection:NO];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[cancelButton setEnabled:true];
|
||||
|
|
Loading…
Reference in a new issue