From 3d4f7238003b6d776a5b51f5fd4efffd634e7a5f Mon Sep 17 00:00:00 2001 From: vcaesar Date: Tue, 19 Mar 2019 11:15:33 -0400 Subject: [PATCH] update code style --- window/alert_c.h | 1 + window/window.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/window/alert_c.h b/window/alert_c.h index df30580..46a2048 100644 --- a/window/alert_c.h +++ b/window/alert_c.h @@ -57,6 +57,7 @@ int showAlert(const char *title, const char *msg, const char *defaultButton, cancelButtonTitle, NULL, &responseFlags); + if (alertHeader != NULL) CFRelease(alertHeader); if (alertMessage != NULL) CFRelease(alertMessage); if (defaultButtonTitle != NULL) CFRelease(defaultButtonTitle); diff --git a/window/window.h b/window/window.h index 3d71bfc..3770955 100644 --- a/window/window.h +++ b/window/window.h @@ -560,7 +560,7 @@ void close_window_by_PId(uintptr pid, uintptr isHwnd){ // CloseWindow void close_window_by_Id(MData m_data){ // Check window validity - if (!IsValid()) {return;} + if (!IsValid()) { return; } #if defined(IS_MACOSX) AXUIElementRef b = NULL; @@ -591,7 +591,7 @@ void close_window_by_Id(MData m_data){ char* get_main_title(){ // Check if the window is valid - if (!IsValid()) {return "IsValid failed.";} + if (!IsValid()) { return "IsValid failed."; } return get_title_by_hand(mData); }