aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index e88d1839b20..8518cc8829d 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -811,7 +811,10 @@ strwidth (str, len)
811 int c = STRING_CHAR (str, endp - str); 811 int c = STRING_CHAR (str, endp - str);
812 812
813 /* Get the way the display table would display it. */ 813 /* Get the way the display table would display it. */
814 disp = DISP_CHAR_VECTOR (dp, c); 814 if (dp)
815 disp = DISP_CHAR_VECTOR (dp, c);
816 else
817 disp = Qnil;
815 818
816 if (VECTORP (disp)) 819 if (VECTORP (disp))
817 thiswidth = XVECTOR (disp)->size; 820 thiswidth = XVECTOR (disp)->size;