diff options
Diffstat (limited to 'src/pal/src/include/pal/dbgmsg.h')
-rw-r--r-- | src/pal/src/include/pal/dbgmsg.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/pal/src/include/pal/dbgmsg.h b/src/pal/src/include/pal/dbgmsg.h index d7219b2bd4..58ab25b92d 100644 --- a/src/pal/src/include/pal/dbgmsg.h +++ b/src/pal/src/include/pal/dbgmsg.h @@ -363,14 +363,17 @@ inline void ANALYZER_NORETURN AssertBreak() } } -#define ASSERT(...) \ -{ \ - __ASSERT_ENTER(); \ - if (output_file && dbg_master_switch) \ - { \ - DBG_printf(defdbgchan,DLI_ASSERT,TRUE,__FUNCTION__,__FILE__,__LINE__,__VA_ARGS__); \ - } \ - AssertBreak(); \ +#define ASSERT(...) \ +{ \ + if (PALIsInitialized()) \ + { \ + __ASSERT_ENTER(); \ + if (output_file && dbg_master_switch) \ + { \ + DBG_printf(defdbgchan,DLI_ASSERT,TRUE,__FUNCTION__,__FILE__,__LINE__,__VA_ARGS__); \ + } \ + AssertBreak(); \ + } \ } #define _ASSERT(expr) do { if (!(expr)) { ASSERT(""); } } while(0) |