mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 18:37:33 +00:00
Don't crash if we can't find a monitor model name
This can happen when running emacs over a forwarded X11 connection. * src/pgtkfns.c (pgtk_get_monitor_scale_factor): Return 0 if we're passed a NULL model name.
This commit is contained in:
parent
ef76e64427
commit
175ebb0104
1 changed files with 3 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ static Lisp_Object monitor_scale_factor_alist;
|
|||
static double
|
||||
pgtk_get_monitor_scale_factor (const char *model)
|
||||
{
|
||||
if (model == NULL)
|
||||
return 0.0;
|
||||
|
||||
Lisp_Object mdl = build_string (model);
|
||||
Lisp_Object tem = Fassoc(mdl, monitor_scale_factor_alist, Qnil);
|
||||
if (NILP (tem))
|
||||
|
|
|
|||
Loading…
Reference in a new issue