From 7505e88db66798b2b8fcdff2d92a7136cd826b5b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 9 Sep 2010 02:26:30 +0200 Subject: Upgrading to IUP 3.2 - and cleaning up. --- iup/src/iup_layout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'iup/src/iup_layout.c') diff --git a/iup/src/iup_layout.c b/iup/src/iup_layout.c index 0ccd496..9387135 100755 --- a/iup/src/iup_layout.c +++ b/iup/src/iup_layout.c @@ -143,8 +143,8 @@ void iupLayoutSetMinMaxSize(Ihandle* ih, int *w, int *h) char* value = iupAttribGet(ih, "MINSIZE"); int min_w = 0, min_h = 0; /* MINSIZE default value */ iupStrToIntInt(value, &min_w, &min_h, 'x'); - if (*w < min_w) *w = min_w; - if (*h < min_h) *h = min_h; + if (w && *w < min_w) *w = min_w; + if (h && *h < min_h) *h = min_h; } if (ih->has_maxsize) @@ -152,8 +152,8 @@ void iupLayoutSetMinMaxSize(Ihandle* ih, int *w, int *h) char* value = iupAttribGet(ih, "MAXSIZE"); int max_w = 65535, max_h = 65535; /* MAXSIZE default value */ iupStrToIntInt(value, &max_w, &max_h, 'x'); - if (*w > max_w) *w = max_w; - if (*h > max_h) *h = max_h; + if (w && *w > max_w) *w = max_w; + if (h && *h > max_h) *h = max_h; } } -- cgit v1.2.3