Fix multiple potential null pointer dereferencess

GCC's optimizer thinks all of these _will_ fail at some point

Change-Id: I287eeb574162a5d3b3347654d25aa1f53e9f5563
This commit is contained in:
Solomon Peachy 2020-10-27 11:14:23 -04:00
parent 621e363e70
commit a605cdf700
8 changed files with 160 additions and 88 deletions

View file

@ -637,12 +637,13 @@ enum plugin_status plugin_start(const void *parameter) {
draw_screen = false;
}
switch(cur_player) {
case BLACK:
cur_strategy = black_strategy;
break;
case WHITE:
cur_strategy = white_strategy;
break;
case BLACK:
default:
cur_strategy = black_strategy;
break;
}
if(cur_strategy->is_robot && !game_finished) {