if (CONSP (val))
{
/* Width and height may look like (width text-pixels
- . PIXELS) on window systems. Mimic that. */
+ . PIXELS) on window systems. Mimic that. */
val = XCDR (val);
if (EQ (val, Qtext_pixels))
val = XCDR (val);
else if (FLOATP (val))
{
/* Width and height may be a float, in which case
- it's a multiple of the parent's value. */
+ it's a multiple of the parent's value. */
struct frame *parent = FRAME_PARENT_FRAME (child);
- int sz = (EQ (key, Qwidth) ? FRAME_TOTAL_COLS (parent)
- : FRAME_TOTAL_LINES (parent));
- val = make_fixnum (XFLOAT_DATA (val) * sz);
+ eassert (parent); /* the caller ensures this, but... */
+ if (parent)
+ {
+ int sz = (EQ (key, Qwidth) ? FRAME_TOTAL_COLS (parent)
+ : FRAME_TOTAL_LINES (parent));
+ val = make_fixnum (XFLOAT_DATA (val) * sz);
+ }
+ else
+ val = Qnil;
}
if (FIXNATP (val))
#ifndef HAVE_ANDROID
# define MOUSE_HL_INFO(F) \
(FRAME_WINDOW_P (F) \
- ? (FRAME_OUTPUT_DATA (F) \
- ? &FRAME_DISPLAY_INFO (F)->mouse_highlight \
- : NULL) \
+ ? &FRAME_DISPLAY_INFO (F)->mouse_highlight \
: &(F)->output_data.tty->display_info->mouse_highlight)
#else
/* There is no "struct tty_output" on Android at all. */