]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't deref NULL. It can have bad results.
authorMichael Jerris <mike@jerris.com>
Thu, 18 Sep 2008 01:49:08 +0000 (01:49 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 18 Sep 2008 01:49:08 +0000 (01:49 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9587 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h

index f799c57ce0301a8d9707382f214c15f8c087e177..7120793519b450ab6fb341b7a37b87a4e29a4169 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
 #endif
 #include <switch.h>
 #define this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0)
-#define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n");}} while(0)
+#define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0)
 #define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0)
 #define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0)
 #define init_vars() allocated = 0;                                             \