do not crash if we are in an unofficial state

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5874 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2004-01-02 08:53:49 +00:00
parent eb32778201
commit 7e6260c44d

View File

@ -263,12 +263,16 @@ ScreenWindow::SetStateByMode()
char str[256]; char str[256];
mode_to_string(mode,str); mode_to_string(mode,str);
marked = fResolutionMenu->FindItem(str); marked = fResolutionMenu->FindItem(str);
marked->SetMarked(true); if (marked) {
marked->SetMarked(true);
}
fInitialResolution = marked; fInitialResolution = marked;
colorspace_to_string(mode.space,str); colorspace_to_string(mode.space,str);
marked = fColorsMenu->FindItem(str); marked = fColorsMenu->FindItem(str);
marked->SetMarked(true); if (marked) {
marked->SetMarked(true);
}
fInitialColors = marked; fInitialColors = marked;
fInitialRefreshN = get_refresh_rate(mode); fInitialRefreshN = get_refresh_rate(mode);