Followup to 287290 on potential static buffer overruns, and fix GTK2 port too. b=287290 r+sr=brendan

This commit is contained in:
dbaron%dbaron.org 2005-03-25 23:28:17 +00:00
Родитель 7b02dd958b
Коммит 335cc35ccf
2 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -1231,9 +1231,7 @@ GdkCursor *nsWindow::GtkCreateCursor(nsCursor aCursorType)
}
/* if by now we dont have a xcursor, this means we have to make a custom one */
if (!gdkcursor) {
NS_ASSERTION(newType != 0xff, "Unknown cursor type and no standard cursor");
if (newType != 0xff) {
gdk_color_parse("#000000", &fg);
gdk_color_parse("#ffffff", &bg);

Просмотреть файл

@ -3529,15 +3529,13 @@ get_gtk_cursor(nsCursor aCursor)
break;
default:
NS_ASSERTION(aCursor, "Invalid cursor type");
gdkcursor = gdk_cursor_new(GDK_LEFT_PTR);
break;
}
// if by now we dont have a xcursor, this means we have to make a
// custom one
if (!gdkcursor) {
NS_ASSERTION(newType != 0xff,
"Unknown cursor type and no standard cursor");
if (newType != 0xff) {
gdk_color_parse("#000000", &fg);
gdk_color_parse("#ffffff", &bg);