GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: add nullptr check for session in DEBUG macro · nodejs/node@5dda33f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_http2.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_http2.h‎

Copy file name to clipboardExpand all lines: src/node_http2.h
+10-6Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,20 @@ void inline debug_vfprintf(const char* format, ...) {
3939
#define DEBUG_HTTP2(...) debug_vfprintf(__VA_ARGS__);
4040
#define DEBUG_HTTP2SESSION(session, message) \
4141
do { \
42-
DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n", \
43-
session->TypeName(), \
44-
session->get_async_id()); \
42+
if (session != nullptr) { \
43+
DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n", \
44+
session->TypeName(), \
45+
session->get_async_id()); \
46+
} \
4547
} while (0)
4648
#define DEBUG_HTTP2SESSION2(session, message, ...) \
4749
do { \
48-
DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n", \
49-
session->TypeName(), \
50-
session->get_async_id(), \
50+
if (session != nullptr) { \
51+
DEBUG_HTTP2("Http2Session %s (%.0lf) " message "\n", \
52+
session->TypeName(), \
53+
session->get_async_id(), \
5154
__VA_ARGS__); \
55+
} \
5256
} while (0)
5357
#define DEBUG_HTTP2STREAM(stream, message) \
5458
do { \

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.