소스 검색

libobs: Add NULL check to encoder deprecation warning

derrod 1 년 전
부모
커밋
d7adbf1e24
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      libobs/obs-encoder.c

+ 1 - 1
libobs/obs-encoder.c

@@ -123,7 +123,7 @@ create_encoder(const char *id, enum obs_encoder_type type, const char *name,
 
 	blog(LOG_DEBUG, "encoder '%s' (%s) created", name, id);
 
-	if (ei->caps & OBS_ENCODER_CAP_DEPRECATED) {
+	if (ei && ei->caps & OBS_ENCODER_CAP_DEPRECATED) {
 		blog(LOG_WARNING,
 		     "Encoder ID '%s' is deprecated and may be removed in a future version.",
 		     id);