| Summary: | SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL | ||
|---|---|---|---|
| Product: | SDL | Reporter: | michael.ehrmann |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
Fixed, thanks! http://hg.libsdl.org/SDL/rev/3fb0c82693af |
When dstrect == NULL and center == NULL real_dstrect gets not initialized because of a typo. I guess that in SDL_RenderCopyEx(...) { ... if (dstrect) real_dstrect = *dstrect; else { real_srcrect.x = 0; real_srcrect.y = 0; real_srcrect.w = renderer->viewport.w; real_srcrect.h = renderer->viewport.h; } ... } real_srcrect should be replace with real_dstrect.