mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
fb_ng: allow NULL argument for Save/RestoreScreen
This commit is contained in:
@@ -1068,7 +1068,7 @@ void CFrameBuffer::paintBackground()
|
|||||||
|
|
||||||
void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
||||||
{
|
{
|
||||||
if (!getActive())
|
if (!getActive() || memp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
uint8_t * pos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
||||||
@@ -1095,7 +1095,7 @@ void CFrameBuffer::SaveScreen(int x, int y, int dx, int dy, fb_pixel_t * const m
|
|||||||
|
|
||||||
void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
void CFrameBuffer::RestoreScreen(int x, int y, int dx, int dy, fb_pixel_t * const memp)
|
||||||
{
|
{
|
||||||
if (!getActive())
|
if (!getActive() || memp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
uint8_t * fbpos = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y;
|
||||||
|
Reference in New Issue
Block a user