[gtk] color plane: Don't allocate 0-size textures
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] color plane: Don't allocate 0-size textures
- Date: Sun, 26 May 2019 04:01:35 +0000 (UTC)
commit 4df64bce834530ba51f72f5a35896e36657e2309
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 20 12:49:56 2019 +0000
color plane: Don't allocate 0-size textures
This triggers critials, and does us no good.
gtk/gtkcolorplane.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index 17f658c9ac..8cf817eb1a 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -129,6 +129,9 @@ create_texture (GtkColorPlane *plane)
width = gtk_widget_get_width (widget);
height = gtk_widget_get_height (widget);
+ if (width == 0 || height == 0)
+ return;
+
g_clear_object (&plane->priv->texture);
stride = width * 4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]