Fixed warning C6011: Dereferencing NULL pointer 'SDL_disabled_events[hi]'.
parent
226f8fde09
commit
3e54061fa8
|
@ -1355,7 +1355,14 @@ void SDL_SetEventEnabled(Uint32 type, SDL_bool enabled)
|
||||||
|
|
||||||
if (enabled != current_state) {
|
if (enabled != current_state) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
#ifdef _MSC_VER /* Visual Studio analyzer can't tell that SDL_disabled_events[hi] isn't NULL if enabled is true */
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 6011)
|
||||||
|
#endif
|
||||||
SDL_disabled_events[hi]->bits[lo / 32] &= ~(1 << (lo & 31));
|
SDL_disabled_events[hi]->bits[lo / 32] &= ~(1 << (lo & 31));
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Gamepad events depend on joystick events */
|
/* Gamepad events depend on joystick events */
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
Loading…
Reference in New Issue