summaryrefslogtreecommitdiff
path: root/libjava/jni
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-19 23:03:57 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-19 23:03:57 +0000
commit8bd55ecfbe28808fae7307cbb7b563828be7bdfc (patch)
tree0a4875aaa5c59c560188b19d8529567f17451eb4 /libjava/jni
parentf7e4ffb8065b0025b0344531e122587090780c11 (diff)
downloadgcc-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.c18
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 ();