We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1929 - SDL_Texture* from SDL_CreateTexture() causes GL_BindTexture() to segfault
Summary: SDL_Texture* from SDL_CreateTexture() causes GL_BindTexture() to segfault
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 21:45 UTC by Charles Huber
Modified: 2013-06-25 23:22 UTC (History)
0 users

See Also:


Attachments
Demo program (820 bytes, text/plain)
2013-06-25 21:45 UTC, Charles Huber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Huber 2013-06-25 21:45:40 UTC
Created attachment 1197 [details]
Demo program

If SDL_CreateTexture() takes the !IsSupportedFormat() path it will return a SDL_Texture* with a NULL driverdata member.

If you then SDL_GL_BindTexture() this will cause a segfault in GL_BindTexture() when it unconditionally dereferences driverdata.

Debian Wheezy, binary Radeon drivers on a "AMD Radeon HD 6900 Series".

SDL2 built from "changeset: 7317:37b77749523b".
Comment 1 Sam Lantinga 2013-06-25 23:22:04 UTC
Fixed, thanks for the report!
http://hg.libsdl.org/SDL/rev/46a5a6b8678e