Skip to content

Commit

Permalink
fix(rime_api.cc): check struct has member of non-pointer type
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Dec 24, 2019
1 parent 62bbead commit 090dfa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ RIME_API void RimeSetup(RimeTraits *traits) {

setup_deployer(traits);
if (PROVIDED(traits, app_name)) {
if (PROVIDED(traits, min_log_level) && PROVIDED(traits, log_dir)) {
if (RIME_STRUCT_HAS_MEMBER(*traits, traits->min_log_level) &&
RIME_STRUCT_HAS_MEMBER(*traits, traits->log_dir)) {
SetupLogging(traits->app_name, traits->min_log_level, traits->log_dir);
} else {
SetupLogging(traits->app_name);
Expand Down

0 comments on commit 090dfa4

Please sign in to comment.