fixed potential crash bug with empty (padding) element buttons in editor