From: gustav_b Date: Wed, 12 Dec 2007 22:45:04 +0000 (+0000) Subject: libgdl: avoid setting a negative preferred height for dock items, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9e4d63058ce3e0a085bb2e833e98b5191e06db94;p=inkscape.git libgdl: avoid setting a negative preferred height for dock items, fixes a runtime warning. --- diff --git a/src/libgdl/gdl-dock-item.c b/src/libgdl/gdl-dock-item.c index 3be8dd3e2..e8ae3d54b 100644 --- a/src/libgdl/gdl-dock-item.c +++ b/src/libgdl/gdl-dock-item.c @@ -1298,7 +1298,7 @@ gdl_dock_item_dock (GdlDockObject *object, } if (req.width > 1) g_object_set (object, "preferred-width", req.width, NULL); - if (req.height > 1) + if (req.height > 1 && object_req.height > req.height) g_object_set (object, "preferred-height", object_req.height - req.height, NULL); break;