diff options
-rw-r--r-- | src/AsciiSink.c | 2 | ||||
-rw-r--r-- | src/Label.c | 6 | ||||
-rw-r--r-- | src/List.c | 4 | ||||
-rw-r--r-- | src/MultiSink.c | 2 | ||||
-rw-r--r-- | src/SmeBSB.c | 2 | ||||
-rw-r--r-- | src/Tip.c | 4 | ||||
-rw-r--r-- | src/XawIm.c | 14 |
7 files changed, 27 insertions, 7 deletions
diff --git a/src/AsciiSink.c b/src/AsciiSink.c index 1ec7bb3..40415bd 100644 --- a/src/AsciiSink.c +++ b/src/AsciiSink.c @@ -1706,6 +1706,8 @@ XawAsciiSinkInitialize(Widget request, Widget cnew, GetGC(sink); + if (!sink->ascii_sink.font) XtError("Aborting: no font found\n"); + sink->ascii_sink.cursor_position = 0; sink->ascii_sink.laststate = XawisOff; sink->ascii_sink.cursor_x = sink->ascii_sink.cursor_y = 0; diff --git a/src/Label.c b/src/Label.c index f2882f2..029fdb8 100644 --- a/src/Label.c +++ b/src/Label.c @@ -527,6 +527,8 @@ XawLabelInitialize(Widget request, Widget cnew, LabelWidget lw = (LabelWidget)cnew; if (!lw->label.font) XtError("Aborting: no font found\n"); + if (lw->simple.international && !lw->label.fontset) + XtError("Aborting: no fontset found\n"); if (lw->label.label == NULL) lw->label.label = XtNewString(lw->core.name); @@ -722,8 +724,8 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew, if (curlw->label.encoding != newlw->label.encoding) was_resized = True; - if (curlw->label.fontset != newlw->label.fontset && - curlw->simple.international) + if (curlw->simple.international + && curlw->label.fontset != newlw->label.fontset) was_resized = True; if (curlw->label.label != newlw->label.label) { @@ -471,6 +471,10 @@ XawListInitialize(Widget temp1, Widget cnew, ArgList args, Cardinal *num_args) { ListWidget lw = (ListWidget)cnew; + if (!lw->list.font) XtError("Aborting: no font found\n"); + if (lw->simple.international && !lw->list.fontset) + XtError("Aborting: no fontset found\n"); + /* * Initialize all private resources */ diff --git a/src/MultiSink.c b/src/MultiSink.c index 513e0f0..0f1e12f 100644 --- a/src/MultiSink.c +++ b/src/MultiSink.c @@ -718,6 +718,8 @@ XawMultiSinkInitialize(Widget request, Widget cnew, GetGC(sink); + if (!sink->multi_sink.fontset) XtError("Aborting: no fontset found\n"); + sink->multi_sink.cursor_position = 0; sink->multi_sink.laststate = XawisOff; sink->multi_sink.cursor_x = sink->multi_sink.cursor_y = 0; diff --git a/src/SmeBSB.c b/src/SmeBSB.c index e360c3f..acf317d 100644 --- a/src/SmeBSB.c +++ b/src/SmeBSB.c @@ -266,6 +266,8 @@ XawSmeBSBInitialize(Widget request, Widget cnew, { SmeBSBObject entry = (SmeBSBObject)cnew; + if (!entry->sme_bsb.font) XtError("Aborting: no font found\n"); + if (entry->sme_bsb.label == NULL) entry->sme_bsb.label = XtName(cnew); else @@ -243,6 +243,10 @@ XawTipInitialize(Widget req, Widget w, ArgList args, Cardinal *num_args) TipWidget tip = (TipWidget)w; XGCValues values; + if (!tip->tip.font) XtError("Aborting: no font found\n"); + if (tip->tip.international && !tip->tip.fontset) + XtError("Aborting: no fontset found\n"); + tip->tip.timer = 0; values.foreground = tip->tip.foreground; 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) { |