---
name: "SDL_GetAssertionHandler"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetAssertionHandler"
---

# SDL\_GetAssertionHandler(3)

Get the current assertion handler.

## NAME

SDL\_GetAssertionHandler - Get the current assertion handler.

## HEADER FILE

Defined in SDL3/SDL\_assert.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_AssertionHandler SDL\_GetAssertionHandler(void \*\*puserdata);**

## DESCRIPTION

This returns the function pointer that is called when an assertion is triggered. This is either the value last passed to

**SDL\_SetAssertionHandler** (), or if no application-specified function is set, is equivalent to calling

**SDL\_GetDefaultAssertionHandler** ().

The parameter **puserdata** is a pointer to a void\*, which will store the "userdata" pointer that was passed to

**SDL\_SetAssertionHandler** (). This value will always be NULL for the default handler. If you don't care about this data, it is safe to pass a NULL pointer to this function to ignore it.

## FUNCTION PARAMETERS

- *puserdata*

  pointer which is filled with the "userdata" pointer that was passed to  **SDL\_SetAssertionHandler** ().

## RETURN VALUE

( **SDL\_AssertionHandler** ) Returns the

**SDL\_AssertionHandler**\
  that is called when an assert triggers.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetAssertionHandler**(3)](/SDL_SetAssertionHandler/3.md)
