Commit b6e9a7df15a7b5cc854d431fade8a1e002013287
1 parent
bd5db506
Exists in
master
and in
1 other branch
Fixing trace tab warning.
Showing
1 changed file
with
9 additions
and
8 deletions
Show diff stats
server/src/plugin/plugin.c
| ... | ... | @@ -40,10 +40,11 @@ |
| 40 | 40 | |
| 41 | 41 | int pw3270_plugin_page_added(GtkWidget *terminal) { |
| 42 | 42 | |
| 43 | - // Creates IPC, associate it with the terminal window. | |
| 43 | + if(!GTK_IS_V3270(terminal)) | |
| 44 | + return EINVAL; | |
| 44 | 45 | |
| 45 | - g_return_val_if_fail(GTK_IS_V3270(terminal),EINVAL); | |
| 46 | 46 | |
| 47 | + // Creates IPC, associate it with the terminal window. | |
| 47 | 48 | // Build session name. |
| 48 | 49 | g_autofree gchar * session_name = g_strdup(v3270_get_session_name(terminal)); |
| 49 | 50 | { |
| ... | ... | @@ -108,13 +109,13 @@ |
| 108 | 109 | |
| 109 | 110 | int pw3270_plugin_page_removed(GtkWidget *terminal) { |
| 110 | 111 | |
| 111 | - if(GTK_IS_V3270(terminal)) { | |
| 112 | - debug("%s(%p)",__FUNCTION__,g_object_get_data(G_OBJECT(terminal),"ipc-object-info")); | |
| 113 | - g_object_set_data(G_OBJECT(terminal), "ipc-object-info", NULL); | |
| 114 | - return 0; | |
| 115 | - } | |
| 112 | + if(!GTK_IS_V3270(terminal)) | |
| 113 | + return EINVAL; | |
| 114 | + | |
| 115 | + debug("%s(%p)",__FUNCTION__,g_object_get_data(G_OBJECT(terminal),"ipc-object-info")); | |
| 116 | + g_object_set_data(G_OBJECT(terminal), "ipc-object-info", NULL); | |
| 117 | + return 0; | |
| 116 | 118 | |
| 117 | - return -1; | |
| 118 | 119 | } |
| 119 | 120 | |
| 120 | 121 | int pw3270_plugin_start(GtkWidget G_GNUC_UNUSED(*window), GtkWidget *terminal) { | ... | ... |