mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30: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,8 +527,11 @@ static struct {
|
||||||
[[gameList documentView] setDataSource:gamelistsrc];
|
[[gameList documentView] setDataSource:gamelistsrc];
|
||||||
[[gameList documentView] deselectAll:nil];
|
[[gameList documentView] deselectAll:nil];
|
||||||
|
|
||||||
|
if (settings.grp)
|
||||||
|
{
|
||||||
int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];
|
int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];
|
||||||
if (row >= 0) {
|
if (row >= 0)
|
||||||
|
{
|
||||||
[[gameList documentView] scrollRowToVisible:row];
|
[[gameList documentView] scrollRowToVisible:row];
|
||||||
#if defined MAC_OS_X_VERSION_10_3 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
|
#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];
|
||||||
|
@ -536,6 +539,7 @@ static struct {
|
||||||
[[gameList documentView] selectRow:row byExtendingSelection:NO];
|
[[gameList documentView] selectRow:row byExtendingSelection:NO];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[cancelButton setEnabled:true];
|
[cancelButton setEnabled:true];
|
||||||
[startButton setEnabled:true];
|
[startButton setEnabled:true];
|
||||||
|
|
Loading…
Reference in a new issue