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

# TTF\_WasInit(3)

Check if SDL\_ttf is initialized.

## NAME

TTF\_WasInit - Check if SDL\_ttf is initialized.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

```
#include "SDL3_ttf/SDL_ttf.h"
```

**int TTF\_WasInit(void);**

## DESCRIPTION

This reports the number of times the library has been initialized by a call to  **TTF\_Init** (), without a paired deinitialization request from

**TTF\_Quit** ().

In short: if it's greater than zero, the library is currently initialized and ready to work. If zero, it is not initialized.

Despite the return value being a signed integer, this function should not return a negative number.

## RETURN VALUE

Returns the current number of initialization calls, that need to eventually be paired with this many calls to  **TTF\_Quit** ().

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_Init**(3)](/TTF_Init/3.md), **•**(3), [**TTF\_Quit**(3)](/TTF_Quit/3.md)
