mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
CFrameBuffer::paintBoxRel: Fix segfault in standby mode
and fix segfault when paintBoxRel2Buf() returns NULL
Origin commit data
------------------
Branch: ni/coolstream
Commit: 86278623a6
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-28 (Thu, 28 Jan 2016)
Origin message was:
------------------
CFrameBuffer::paintBoxRel: Fix segfault in standby mode
and fix segfault when paintBoxRel2Buf() returns NULL
------------------
This commit was generated by Migit
This commit is contained in:
@@ -730,6 +730,9 @@ fb_pixel_t* CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, co
|
|||||||
const fb_pixel_t /*col*/, gradientData_t *gradientData,
|
const fb_pixel_t /*col*/, gradientData_t *gradientData,
|
||||||
int radius, int type)
|
int radius, int type)
|
||||||
{
|
{
|
||||||
|
if (!getActive())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
fb_pixel_t MASK = 0xFFFFFFFF;
|
fb_pixel_t MASK = 0xFFFFFFFF;
|
||||||
int _dx = dx;
|
int _dx = dx;
|
||||||
int w_align;
|
int w_align;
|
||||||
@@ -754,6 +757,8 @@ fb_pixel_t* CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, co
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fb_pixel_t* boxBuf = paintBoxRel2Buf(_dx, dy, w_align, offs_align, MASK, NULL, radius, type);
|
fb_pixel_t* boxBuf = paintBoxRel2Buf(_dx, dy, w_align, offs_align, MASK, NULL, radius, type);
|
||||||
|
if (boxBuf == NULL)
|
||||||
|
return NULL;
|
||||||
fb_pixel_t *bp = boxBuf;
|
fb_pixel_t *bp = boxBuf;
|
||||||
fb_pixel_t *gra = gradientData->gradientBuf;
|
fb_pixel_t *gra = gradientData->gradientBuf;
|
||||||
gradientData->boxBuf = boxBuf;
|
gradientData->boxBuf = boxBuf;
|
||||||
|
Reference in New Issue
Block a user