undo().recordUndoBufferParams(CursorData());
branch_list.add(branch_name);
branch = branch_list.find(branch_name);
- branch->setColors("background", "background");
+ if (branch)
+ // needed to update the color table for dark mode
+ branch->setColors("background", "background");
dr.setError(false);
dr.screenUpdate(Update::Force);
}