X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fscrollbar-x.c;h=b7b193b05984b02a7bb70e2848beb6b8118a46dd;hb=bbf3133177a15f214e3d0060e168ed86dbeed8a2;hp=39967fd00abbe579646e00984f700eea24af6b2a;hpb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;p=chise%2Fxemacs-chise.git.1 diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index 39967fd..b7b193b 100644 --- a/src/scrollbar-x.c +++ b/src/scrollbar-x.c @@ -71,19 +71,21 @@ x_inhibit_scrollbar_slider_size_change (void) static void x_free_scrollbar_instance (struct scrollbar_instance *instance) { - if (SCROLLBAR_X_NAME (instance)) - xfree (SCROLLBAR_X_NAME (instance)); - - if (SCROLLBAR_X_WIDGET (instance)) + if (instance->scrollbar_data) { - if (XtIsManaged (SCROLLBAR_X_WIDGET (instance))) - XtUnmanageChild (SCROLLBAR_X_WIDGET (instance)); + if (SCROLLBAR_X_NAME (instance)) + xfree (SCROLLBAR_X_NAME (instance)); - lw_destroy_all_widgets (SCROLLBAR_X_ID (instance)); - } + if (SCROLLBAR_X_WIDGET (instance)) + { + if (XtIsManaged (SCROLLBAR_X_WIDGET (instance))) + XtUnmanageChild (SCROLLBAR_X_WIDGET (instance)); - if (instance->scrollbar_data) - xfree (instance->scrollbar_data); + lw_destroy_all_widgets (SCROLLBAR_X_ID (instance)); + } + + xfree (instance->scrollbar_data); + } } /* A device method. */ @@ -280,7 +282,7 @@ x_update_scrollbar_instance_status (struct window *w, int active, int size, } } - if (!wv->scrollbar_data) abort (); + if (!wv->scrollbar_data) ABORT (); free_widget_value_tree (wv); } else if (managed) @@ -366,7 +368,7 @@ x_scrollbar_loop (enum x_scrollbar_loop type, Lisp_Object window, } break; default: - abort (); + ABORT (); } } @@ -685,13 +687,13 @@ x_scrollbar_pointer_changed_in_window (struct window *w) void x_update_frame_scrollbars (struct frame *f) { - /* Consider this code to be "in_display" so that we abort() if Fsignal() + /* Consider this code to be "in_display" so that we ABORT() if Fsignal() gets called. */ in_display++; x_scrollbar_loop (X_UPDATE_FRAME_SCROLLBARS, f->root_window, f->root_mirror, 0, (Window) NULL); in_display--; - if (in_display < 0) abort (); + if (in_display < 0) ABORT (); } #ifdef MEMORY_USAGE_STATS