num_exp: bitwise ops and op precedence
[m6w6/ext-psi] / src / data.h
index 3c48716cd21820af4b1d4e30f657e8a3479c04e9..5356a7ec43d858f8a2f1050a60a0f1291b81f4aa 100644 (file)
@@ -36,7 +36,7 @@
 #include <stdarg.h>
 
 #define PSI_DEBUG_PRINT(ctx, msg, ...) do { \
-       if (PSI_DATA(ctx)->flags & PSI_DEBUG) { \
+       if ((ctx) && (PSI_DATA(ctx)->flags & PSI_DEBUG)) { \
                fprintf(stderr, msg, __VA_ARGS__); \
        } \
 } while(0)