소스 검색

Merge pull request #582 from Xaymar/master

libobs: Fix possible null pointer dereference
Jim 9 년 전
부모
커밋
ed829e93ae
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      libobs/obs-properties.c

+ 2 - 1
libobs/obs-properties.c

@@ -585,7 +585,8 @@ bool obs_property_button_clicked(obs_property_t *p, void *obj)
 		struct button_data *data = get_type_data(p,
 				OBS_PROPERTY_BUTTON);
 		if (data && data->callback)
-			return data->callback(p->parent, p, context->data);
+			return data->callback(p->parent, p,
+					(context ? context->data : NULL));
 	}
 
 	return false;