Skip to content
Myr

Fix STBIR__FREE_AND_CLEAR causing null reference member access

Before adoption: this commit came in with the history the project adopted, so no landing records it.

`stb_image_resize2.h:6734:5: runtime error: member access within null pointer of type 'stbir__info' (aka 'struct stbir__info')`

authored by xchellx · committed by xchellx · parent 31707d1 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb_image_resize2.h+1 added-1 removed
6687 unmodified lines
6688}66896690static void stbir__free_internal_mem( stbir__info *info )6691{6692 #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); (ptr) = 0; STBIR_FREE( p, info->user_data); } }6692 #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); STBIR_FREE( p, info->user_data); (ptr) = 0; } }66936694 if ( info )6695 {6696 #ifndef STBIR__SEPARATE_ALLOCATIONS
3904 unmodified lines