diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-19 23:03:57 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-19 23:03:57 +0000 |
commit | 8bd55ecfbe28808fae7307cbb7b563828be7bdfc (patch) | |
tree | 0a4875aaa5c59c560188b19d8529567f17451eb4 /libjava/jni | |
parent | f7e4ffb8065b0025b0344531e122587090780c11 (diff) | |
download | gcc-8bd55ecfbe28808fae7307cbb7b563828be7bdfc.tar.gz |
2004-03-20 Mark Wielaard <mark@klomp.org>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getVScrollbarWidth):
Don't access ws when it is null.
(Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getHScrollbarHeight):
Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79708 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni')
-rw-r--r-- | libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c index ed9ced653da..704273c08a3 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c @@ -188,9 +188,12 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getHScrollbarHeight gdk_threads_enter (); sw = GTK_SCROLLED_WINDOW (ptr); - gtk_widget_size_request (sw->hscrollbar, &requisition); - gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); - height = requisition.height + spacing; + if (sw) + { + gtk_widget_size_request (sw->hscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + height = requisition.height + spacing; + } gdk_threads_leave (); @@ -212,9 +215,12 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getVScrollbarWidth gdk_threads_enter (); sw = GTK_SCROLLED_WINDOW (ptr); - gtk_widget_size_request (sw->vscrollbar, &requisition); - gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); - width = requisition.width + spacing; + if (sw) + { + gtk_widget_size_request (sw->vscrollbar, &requisition); + gtk_widget_style_get (GTK_WIDGET (sw), "scrollbar_spacing", &spacing, NULL); + width = requisition.width + spacing; + } gdk_threads_leave (); |