]> git.eshelyaron.com Git - emacs.git/commitdiff
Raise an error if creating an unknown xwidget type
authorPo Lu <luangruo@yahoo.com>
Tue, 9 Nov 2021 04:03:47 +0000 (05:03 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 9 Nov 2021 04:03:47 +0000 (05:03 +0100)
* src/xwidget.c (Fmake_xwidget): Error if TYPE is invalid (bug#51682).

src/xwidget.c

index 294e9f8788ce1030834d0915cf1902cb1c3ef8ee..4d1d1169af984f3c4852fe75fb578e8d0c9082ec 100644 (file)
@@ -128,6 +128,9 @@ fails.  */)
   CHECK_FIXNAT (width);
   CHECK_FIXNAT (height);
 
+  if (!EQ (type, Qwebkit))
+    error ("Bad xwidget type");
+
   struct xwidget *xw = allocate_xwidget ();
   Lisp_Object val;
   xw->type = type;