summaryrefslogtreecommitdiff
path: root/usr.bin/mg/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mg/main.c')
-rw-r--r--usr.bin/mg/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c
index a56ba40ee75..8a5fa78ed05 100644
--- a/usr.bin/mg/main.c
+++ b/usr.bin/mg/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.20 2002/07/01 14:33:44 vincent Exp $ */
+/* $OpenBSD: main.c,v 1.21 2002/07/03 03:47:59 vincent Exp $ */
/*
* Mainline.
@@ -111,6 +111,8 @@ edinit(void)
bheadp = NULL;
bp = bfind("*scratch*", TRUE); /* Text buffer. */
wp = (MGWIN *)malloc(sizeof(MGWIN)); /* Initial window. */
+ if (wp == NULL)
+ panic("Out of memory");
if (bp == NULL || wp == NULL)
panic("edinit");
curbp = bp; /* Current ones. */