mirror of
https://github.com/tailix/libkernaux.git
synced 2024-11-13 11:04:27 -05:00
Protect from segfault
This commit is contained in:
parent
eae451ee75
commit
1395896538
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,8 @@ const void *KernAux_StackTrace_Frame_get_ptr(
|
||||||
) {
|
) {
|
||||||
KERNAUX_ASSERT(frame);
|
KERNAUX_ASSERT(frame);
|
||||||
|
|
||||||
|
if (!frame->cur_ptr) return NULL;
|
||||||
|
|
||||||
#if defined(ASM_X86)
|
#if defined(ASM_X86)
|
||||||
const size_t *const cur_ptr = frame->cur_ptr;
|
const size_t *const cur_ptr = frame->cur_ptr;
|
||||||
return (const void*)cur_ptr[1];
|
return (const void*)cur_ptr[1];
|
||||||
|
|
Loading…
Reference in a new issue