[gtk/wip/matthiasc/popup5: 169/187] color plane: Don't allocate 0-size textures
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 169/187] color plane: Don't allocate 0-size textures
- Date: Thu, 23 May 2019 11:07:46 +0000 (UTC)
commit 9da75547223ce2172a3ccb686577b2561a9afa40
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 2c2867a28a..f6eaf311a0 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]