1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

fixed segfault with incomplete WM_CLASS

This commit is contained in:
kojima
2002-02-20 15:01:44 +00:00
parent 58e719654f
commit a8950af8ac
7 changed files with 49 additions and 6 deletions

View File

@@ -527,8 +527,7 @@ saveSettings(WMButton *button, InspectorPanel *panel)
else if (WMGetButtonSelected(panel->bothRb) != 0) {
char *buffer;
buffer = wmalloc(strlen(wwin->wm_instance)+strlen(wwin->wm_class)+2);
sprintf(buffer, "%s.%s", wwin->wm_instance, wwin->wm_class);
buffer = StrConcatDot(wwin->wm_instance, wwin->wm_class);
key = WMCreatePLString(buffer);
wfree(buffer);
} else if (WMGetButtonSelected(panel->defaultRb) != 0) {
@@ -684,8 +683,7 @@ saveSettings(WMButton *button, InspectorPanel *panel)
char *class = wapp->main_window_desc->wm_class;
char *buffer;
buffer = wmalloc(strlen(instance)+strlen(class)+2);
sprintf(buffer, "%s.%s", instance, class);
buffer = StrConcatDot(instance, class);
key2 = WMCreatePLString(buffer);
wfree(buffer);