GTK: Ensure core windows are fully initialised.

This commit is contained in:
Michael Drake 2017-06-11 10:05:59 +01:00
parent d34b0726e3
commit dfa1e0bcd3
4 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}