mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-28 06:49:41 +03:00
GTK: Ensure core windows are fully initialised.
This commit is contained in:
parent
d34b0726e3
commit
dfa1e0bcd3
@ -246,7 +246,7 @@ static nserror nsgtk_cookies_init(void)
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
ncwin = malloc(sizeof(struct nsgtk_cookie_window));
|
||||
ncwin = calloc(1, sizeof(*ncwin));
|
||||
if (ncwin == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ static nserror nsgtk_global_history_init(void)
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
ncwin = malloc(sizeof(struct nsgtk_global_history_window));
|
||||
ncwin = calloc(1, sizeof(*ncwin));
|
||||
if (ncwin == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ static nserror nsgtk_hotlist_init(void)
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
ncwin = malloc(sizeof(struct nsgtk_hotlist_window));
|
||||
ncwin = calloc(1, sizeof(*ncwin));
|
||||
if (ncwin == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ nsgtk_local_history_init(struct browser_window *bw,
|
||||
return res;
|
||||
}
|
||||
|
||||
ncwin = malloc(sizeof(struct nsgtk_local_history_window));
|
||||
ncwin = calloc(1, sizeof(*ncwin));
|
||||
if (ncwin == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user