소스 검색

mac-syphon: Replace source addref calls with get_ref

Jim 3 년 전
부모
커밋
404ebdbd51
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      plugins/mac-syphon/syphon.m

+ 3 - 2
plugins/mac-syphon/syphon.m

@@ -892,8 +892,9 @@ static void syphon_release(void *param)
 
 
 static inline obs_properties_t *syphon_properties_internal(syphon_t s)
 static inline obs_properties_t *syphon_properties_internal(syphon_t s)
 {
 {
-	if (s)
-		obs_source_addref(s->source);
+	if (s && obs_source_get_ref(s->source) == NULL) {
+		s = NULL;
+	}
 
 
 	obs_properties_t *props =
 	obs_properties_t *props =
 		obs_properties_create_param(s, syphon_release);
 		obs_properties_create_param(s, syphon_release);