[gtk/wip/chergert/glproto: 292/493] igmore zero case
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 292/493] igmore zero case
- Date: Fri, 19 Feb 2021 02:25:14 +0000 (UTC)
commit d796663a552a8054388d8ca327e26fd5b2e309dd
Author: Christian Hergert <chergert redhat com>
Date: Thu Jan 28 21:32:37 2021 -0800
igmore zero case
gsk/next/ninesliceprivate.h | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gsk/next/ninesliceprivate.h b/gsk/next/ninesliceprivate.h
index 2bf1c006ff..d0f55545ed 100644
--- a/gsk/next/ninesliceprivate.h
+++ b/gsk/next/ninesliceprivate.h
@@ -151,6 +151,9 @@ static inline void
nine_slice_grow (GskGLTextureNineSlice *slices,
int amount)
{
+ if (amount == 0)
+ return;
+
/* top left */
slices[0].rect.x -= amount;
slices[0].rect.y -= amount;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]