summaryrefslogtreecommitdiff
path: root/src/XawIm.c
diff options
context:
space:
mode:
authorDeron Johnson <deron.johnson@sun.com>2005-02-17 22:44:28 +0000
committerDeron Johnson <deron.johnson@sun.com>2005-02-17 22:44:28 +0000
commit2d65da503c6974ff928abb158a6f1a253842b8af (patch)
tree6cdb7dfe47db72f22011ed7e20f2c4c3418618dc /src/XawIm.c
parentc7f720ae3f0dea94bc6e9eb9bdbbf00e6bb16b24 (diff)
downloadxorg-lib-libXaw-lg3d-dev-0-6-2.tar.gz
Diffstat (limited to 'src/XawIm.c')
-rw-r--r--src/XawIm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/XawIm.c b/src/XawIm.c
index 69c2f99..06f94ef 100644
--- a/src/XawIm.c
+++ b/src/XawIm.c
@@ -808,8 +808,10 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
- height = maxAscentOfFontSet(p->font_set)
- + maxDescentOfFontSet(p->font_set);
+ if (p->font_set) {
+ height = maxAscentOfFontSet(p->font_set)
+ + maxDescentOfFontSet(p->font_set);
+ }
height = SetVendorShellHeight(ve, height);
}
if (p->flg & CIFg) {
@@ -938,7 +940,7 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
XPointer ic_a[20], pe_a[20], st_a[20];
int ic_cnt = 0, pe_cnt = 0, st_cnt = 0;
XawTextMargin *margin;
- int height;
+ int height = 0;
if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
(p->xic == NULL)) return;
@@ -965,8 +967,10 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
- height = maxAscentOfFontSet(p->font_set)
- + maxDescentOfFontSet(p->font_set);
+ if (p->font_set) {
+ height = maxAscentOfFontSet(p->font_set)
+ + maxDescentOfFontSet(p->font_set);
+ }
height = SetVendorShellHeight(ve, height);
}
if (p->flg & CIFg) {