[gtk/wip/matthiasc/popup5: 128/150] 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: 128/150] color plane: Don't allocate 0-size textures
- Date: Fri, 24 May 2019 02:08:56 +0000 (UTC)
commit 440df62b9590b4ac430b3c2d90d718447625bc10
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]