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 1577

Summary: SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL
Product: SDL Reporter: michael.ehrmann
Component: videoAssignee: 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   

Description michael.ehrmann 2012-08-23 14:00:27 UTC
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.
Comment 1 Gabriel Jacobo 2012-08-24 07:58:26 UTC
Fixed, thanks! http://hg.libsdl.org/SDL/rev/3fb0c82693af