Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/games/acm/files/patch-V_lib_InitAWin.c
16151 views
1
--- V/lib/InitAWin.c.orig 1998-08-14 21:09:02 UTC
2
+++ V/lib/InitAWin.c
3
@@ -69,6 +69,13 @@ InitializeX11AWindow(Display * dpy, int screen, Drawab
4
w->csPool1 = (ColorSegment *) malloc(w->CSSize1 * sizeof(ColorSegment));
5
memset(w->csPool1, 0, w->CSSize1 * sizeof(ColorSegment));
6
7
+ // Initialize csPool2 so program doesn't crash later,
8
+ // when trying to free it.
9
+ {
10
+ w->CSSize2 = 0;
11
+ w->csPool2 = (ColorSegment *) NULL;
12
+ }
13
+
14
w->scanLine = (ScanLine *) malloc((w->height + 1) * sizeof(ScanLine));
15
w->lastScanLine = (ScanLine *) malloc((w->height + 1) * sizeof(ScanLine));
16
w->otherLastScanLine = NULL;
17
18