diff --git a/android/client/if-main.h b/android/client/if-main.h
index a83f48b..4a5d4cc 100644
--- a/android/client/if-main.h
+++ b/android/client/if-main.h
/* Helper macro for executing function on interface and printing BT_STATUS */
#define EXEC(f, ...) \
{ \
- int err = f(__VA_ARGS__); \
- haltest_info("%s: %s\n", #f, bt_status_t2str(err)); \
+ if (f) { \
+ int err = f(__VA_ARGS__); \
+ haltest_info("%s: %s\n", #f, bt_status_t2str(err)); \
+ } else { \
+ haltest_info("%s is NULL\n", #f); \
+ } \
}
/* Helper macro for executing void function on interface */