| Summary: | SDL Render functions crash when using window menus | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Angus Holder <aholder97+bugzilla> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.4 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: | Complete test case source file, including build instructions. | ||
I have found that the issue is specific to the Direct3D renderer, so am currently working around it with SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"); I'm using an Intel HD4400 GPU, with driver version 10.18.10.3345, forgot to add that in the original post. |
Created attachment 2437 [details] Complete test case source file, including build instructions. I have been using the Windows API to add a window menu to the top bar, but when I try using the SDL Render API instead of raw OpenGL, I get a null pointer dereference crash at the first render function that's reached (both SDL_RenderClear and SDL_SetRenderDrawColor will crash). The only Windows specific event I capture is WM_CREATE, where I append a menu to the Window. I'm compiling with the compiler of Visual Studio 2015. Attached is a minimal repro of my issue. The crash doesn't happen if I don't attach a menu to my window, or, strangely, if I don't create a texture.