Browse Source

libobs: Fix possible null pointer dereference

jp9000 9 years ago
parent
commit
5fb9dcbaa7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/obs-scene.c

+ 1 - 1
libobs/obs-scene.c

@@ -1400,7 +1400,7 @@ void obs_sceneitem_select(obs_sceneitem_t *item, bool select)
 	uint8_t stack[128];
 	const char *command = select ? "item_select" : "item_deselect";
 
-	if (!item || item->selected == select)
+	if (!item || item->selected == select || !item->parent)
 		return;
 
 	item->selected = select;