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;
|
break;
|
||||||
|
|
||||||
case kMsgRemoveServer:
|
case kMsgRemoveServer:
|
||||||
|
{
|
||||||
|
int32 currentSelection = fServerListView->CurrentSelection();
|
||||||
|
if (currentSelection < 0)
|
||||||
|
break;
|
||||||
|
|
||||||
fSettings.RemoveServer(((BStringItem*)
|
fSettings.RemoveServer(((BStringItem*)
|
||||||
fServerListView->ItemAt(
|
fServerListView->ItemAt(currentSelection))->Text());
|
||||||
fServerListView->
|
|
||||||
CurrentSelection()))->Text());
|
|
||||||
_UpdateServerList();
|
_UpdateServerList();
|
||||||
Looper()->PostMessage(new BMessage(kMsgChange));
|
Looper()->PostMessage(new BMessage(kMsgChange));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case kMsgResetServerList:
|
case kMsgResetServerList:
|
||||||
fSettings.ResetServersToDefaults();
|
fSettings.ResetServersToDefaults();
|
||||||
|
|||||||
Reference in New Issue
Block a user