mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-06 14:53:48 +00:00
PowerControl: Improve nulls in MenuItems
This commit is contained in:
parent
06f2d9a702
commit
ebe1cdba87
3 changed files with 11 additions and 20 deletions
|
|
@ -2,7 +2,7 @@ namespace PowerControl.Menu
|
|||
{
|
||||
public class MenuItemSeparator : MenuItem
|
||||
{
|
||||
private ToolStripItem toolStripItem;
|
||||
private ToolStripItem toolStripItem = new ToolStripSeparator();
|
||||
|
||||
public MenuItemSeparator()
|
||||
{
|
||||
|
|
@ -11,10 +11,6 @@ namespace PowerControl.Menu
|
|||
|
||||
public override void CreateMenu(ToolStripItemCollection collection)
|
||||
{
|
||||
if (toolStripItem != null)
|
||||
return;
|
||||
|
||||
toolStripItem = new ToolStripSeparator();
|
||||
collection.Add(toolStripItem);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue