Skip to content

Commit 0fc545a

Browse files
Fix xpointer constructor for null pointers.
1 parent 73b75e1 commit 0fc545a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

XenonUtils/xbox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct xpointer
105105
{
106106
}
107107

108-
xpointer(T* ptr) : ptr(reinterpret_cast<size_t>(ptr) - reinterpret_cast<size_t>(MmGetHostAddress(0)))
108+
xpointer(T* p) : ptr(p != nullptr ? (reinterpret_cast<size_t>(p) - reinterpret_cast<size_t>(MmGetHostAddress(0))) : 0)
109109
{
110110
}
111111

0 commit comments

Comments
 (0)