wmbiff: fixed possible null-pointer dereference.
[dockapps.git] / wmCalClock / Src / wmcalclock.patch
blob63058e5635595f870265582a38dc321e0382691a
1 *** fastCalClock.c Thu Jul 1 10:08:07 1999
2 --- wmCalClock.c Thu Jul 1 09:38:53 1999
3 ***************
4 *** 272,278 ****
5 int GotFirstClick2, GotDoubleClick2;
6 int GotFirstClick3, GotDoubleClick3;
7 int DblClkDelay;
8 - int HasExecute = 0; /* controls perf optimization */
9 char ExecuteCommand[1024];
12 --- 272,277 ----
13 ***************
14 *** 451,457 ****
15 * to catch expose events, etc...
18 ! if ( HasExecute == 0 || n>10){
20 n = 0;
22 --- 450,456 ----
23 * to catch expose events, etc...
26 ! if (n>10){
28 n = 0;
30 ***************
31 *** 722,734 ****
32 * Redraw and wait for next update
34 RedrawWindow();
35 ! if( HasExecute == 1) {
36 ! usleep(DELAY);
37 ! } else if( ShowSeconds == 1) {
38 ! usleep( 200000L);
39 ! } else {
40 ! usleep( 500000L);
41 ! }
45 --- 721,727 ----
46 * Redraw and wait for next update
48 RedrawWindow();
49 ! usleep(DELAY);
53 ***************
54 *** 817,823 ****
55 exit(-1);
57 strcpy(ExecuteCommand, argv[++i]);
58 - HasExecute = 1;
60 } else if (!strcmp(argv[i], "-g")){
62 --- 810,815 ----
63 ***************
64 *** 975,981 ****
65 char Command[512];
68 - if( HasExecute == 0) return; /* no command specified. Ignore clicks. */
69 DblClkDelay = 0;
70 if ((xev->button == Button1) && (xev->type == ButtonPress)){
71 if (GotFirstClick1) GotDoubleClick1 = 1;
72 --- 967,972 ----