opt: remove len check
This commit is contained in:
parent
785c34f36b
commit
bca854ff18
1 changed files with 2 additions and 2 deletions
|
|
@ -143,8 +143,8 @@ void texture_rgba_renderer_plugin_register_with_registrar(FlPluginRegistrar *reg
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void FlutterRgbaRendererPluginOnRgba(void *texture_rgba_ptr, const uint8_t *buffer, int len, int width, int height, int stride_align) {
|
void FlutterRgbaRendererPluginOnRgba(void *texture_rgba_ptr, const uint8_t *buffer, int len, int width, int height, int stride_align) {
|
||||||
// Check whether the parameter is valid.
|
// Check whether the parameter is valid.
|
||||||
if (len != 4 * width * height || width == 0 || height == 0) {
|
if (width == 0 || height == 0) {
|
||||||
g_warning("The data length, width, height is not valid, ignoring this request.");
|
g_warning("The width, height is not valid, ignoring this request.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TextureRgba* self = TEXTURE_RGBA(texture_rgba_ptr);
|
TextureRgba* self = TEXTURE_RGBA(texture_rgba_ptr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue