修复编译错误, 修复vst2可能会导致的崩溃
This commit is contained in:
parent
54a6bed4ed
commit
dc57b52be1
@ -13,13 +13,8 @@ application::application() {
|
||||
|
||||
void application::init() {
|
||||
// 创建控制台日志记录器
|
||||
#if PLATFORM_MACOS
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_sink_st>();
|
||||
console_sink->set_level(spdlog::level::info); // 设置控制台日志级别
|
||||
#else
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_st>();
|
||||
console_sink->set_level(spdlog::level::info); // 设置控制台日志级别
|
||||
#endif
|
||||
|
||||
// 创建文件日志记录器
|
||||
auto file_sink = std::make_shared<spdlog::sinks::daily_file_sink_st>("logs/log.txt", 0, 0); // 每天创建一个新的日志文件
|
||||
|
@ -222,7 +222,7 @@ void vst2_plugin_host::idle_editor() {
|
||||
}
|
||||
|
||||
bool vst2_plugin_host::has_editor() const {
|
||||
return effect_->flags & effFlagsHasEditor;
|
||||
return effect_ && effect_->flags & effFlagsHasEditor;
|
||||
}
|
||||
|
||||
void vst2_plugin_host::get_editor_size(uint32_t& width, uint32_t& height) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user