diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 02:26:30 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 02:32:26 +0200 |
commit | 7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch) | |
tree | b6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/src/iup_layout.c | |
parent | e9a184546b18cf3b796bd560561f312934004c54 (diff) |
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/src/iup_layout.c')
-rwxr-xr-x | iup/src/iup_layout.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |