Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion graf2d/x11/src/Rotated.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ static RotatedTextItem_t *XRotCreateTextItem(Display *dpy, XFontStruct *font, fl
RotatedTextItem_t *item = (RotatedTextItem_t *)malloc((unsigned)sizeof(RotatedTextItem_t));
if(!item) return nullptr;

memset(item, 0, sizeof(RotatedTextItem_t));

/* count number of sections in string */
item->fNl=1;
if(align!=NONE)
Expand Down Expand Up @@ -868,7 +870,7 @@ static RotatedTextItem_t *XRotCreateTextItem(Display *dpy, XFontStruct *font, fl

/* bitmap for drawing on */
canvas=XCreatePixmap(dpy, DefaultRootWindow(dpy),
item->fColsIn, item->fRowsIn, 1);
item->fColsIn > 0 ? item->fColsIn : 1, item->fRowsIn, 1);

/* create a GC for the bitmap */
font_gc = XCreateGC(dpy, canvas, 0, nullptr);
Expand Down
Loading