Mercurial > projects > dwt-linux
diff dwt/widgets/TableColumn.d @ 248:34409a2fc053
Fix call OS.gtk_label_set_text_with_mnemonic with valid ptr, even for zero length strings.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 19:00:47 +0200 |
parents | 380bad9f6852 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/widgets/TableColumn.d Mon May 19 22:20:13 2008 +0200 +++ b/dwt/widgets/TableColumn.d Thu May 22 19:00:47 2008 +0200 @@ -613,8 +613,7 @@ if (string is null) error (DWT.ERROR_NULL_ARGUMENT); super.setText (string); char [] chars = fixMnemonic (string); - char* buffer = tango.stdc.stringz.toStringz( chars ); - OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer); + OS.gtk_label_set_text_with_mnemonic (labelHandle, chars.toStringzValidPtr() ); if (string.length !is 0) { OS.gtk_widget_show (labelHandle); } else {