Browse Source

Don't call `ui::SetAtomArrayProperty` with an empty vector (fails DCHECK)

Ales Pergl 7 years ago
parent
commit
fd7af5c1d9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      atom/browser/native_window_views.cc

+ 3 - 2
atom/browser/native_window_views.cc

@@ -273,8 +273,9 @@ NativeWindowViews::NativeWindowViews(
       state_atom_list.push_back(GetAtom("_NET_WM_STATE_MODAL"));
   }
 
-  ui::SetAtomArrayProperty(GetAcceleratedWidget(), "_NET_WM_STATE", "ATOM",
-                           state_atom_list);
+  if (!state_atom_list.empty())
+    ui::SetAtomArrayProperty(GetAcceleratedWidget(), "_NET_WM_STATE", "ATOM",
+                             state_atom_list);
 
   // Set the _NET_WM_WINDOW_TYPE.
   if (!window_type.empty())