enigma-dev/enigma-dev — pull request #868 by sorlok (2014-11-17 23:29:33+00:00)
Title: Fixes a crash when a background is visible but unspecified.

Test case:
1. Make a new game.
2. Make a new room.
3. In the room, set background 0 to "visible", but don't actually assign a background.
4. Run game; it segfaults.

GM:S runs just fine, and I don't see any reason to consider unspecified backgrounds an error. This patch adds the following check to draw_back() in each Graphics_System:
```
if (int(background_index[back_current]) >= 0) {
//normal code.
}
```

Tested on Linux with GL1 and GL3. Please test on Windows/DirectX (but it's a small change, so it should be fine.)