X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fscrollbar-x.c;h=b7b193b05984b02a7bb70e2848beb6b8118a46dd;hb=761f92c159f8327ecf570ab8e9a4b27cd5e35732;hp=53d4c24b1405fa873d933628810e7944abdb2814;hpb=ee38d21b330f5001b47a577cefb5ba7b82a3b7d3;p=chise%2Fxemacs-chise.git.1 diff --git a/src/scrollbar-x.c b/src/scrollbar-x.c index 53d4c24..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. */