X-Git-Url: https://git.jsancho.org/?p=c-irrlicht.git;a=blobdiff_plain;f=src%2FIVideoDriver.cpp;h=86d7347b31e7e5baf832f50f7b4957524c478f22;hp=517275d973d7350b62789a4238ff847b44c4a34b;hb=d4c1672f2e51f17dd6d125c37ec2ef058faf5d69;hpb=abace28761d72d1aa00150f60eafa6723581c65c diff --git a/src/IVideoDriver.cpp b/src/IVideoDriver.cpp index 517275d..86d7347 100644 --- a/src/IVideoDriver.cpp +++ b/src/IVideoDriver.cpp @@ -38,18 +38,21 @@ extern "C" { irr::video::SExposedVideoData vdata = irr::video::SExposedVideoData(); // Source rect - irr::core::rect rect = \ - irr::core::rect(sourceRect->x, - sourceRect->y, - sourceRect->x2, - sourceRect->y2); + irr::core::rect rect; + if (sourceRect != NULL) + { + rect = irr::core::rect(sourceRect->x, + sourceRect->y, + sourceRect->x2, + sourceRect->y2); + } // Begin scene return ((irr::video::IVideoDriver*)driver)->beginScene(backBuffer, - zBuffer, - col, - vdata, - &rect); + zBuffer, + col, + vdata, + sourceRect != NULL ? &rect : 0); } bool irr_video_IVideoDriver_endScene(void* driver)