Time Preferences crashes with empty selection
Application "Time" crashes when you push "Remove" button without any selection on list of network time servers. Fixes #10716 Please use git format-patch to create your patches in the future so that the author information is preserved. Signed-off-by: John Scipione <[email protected]>
This commit is contained in:
committed by
John Scipione
parent
aafc3386ef
commit
39a1e74b08
@@ -308,13 +308,17 @@ NetworkTimeView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
|
||||
case kMsgRemoveServer:
|
||||
{
|
||||
int32 currentSelection = fServerListView->CurrentSelection();
|
||||
if (currentSelection < 0)
|
||||
break;
|
||||
|
||||
fSettings.RemoveServer(((BStringItem*)
|
||||
fServerListView->ItemAt(
|
||||
fServerListView->
|
||||
CurrentSelection()))->Text());
|
||||
fServerListView->ItemAt(currentSelection))->Text());
|
||||
_UpdateServerList();
|
||||
Looper()->PostMessage(new BMessage(kMsgChange));
|
||||
break;
|
||||
}
|
||||
|
||||
case kMsgResetServerList:
|
||||
fSettings.ResetServersToDefaults();
|
||||
|
||||
Reference in New Issue
Block a user