mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-14 17:48:05 -05:00
GTK: unregister dialog boxes before delivering the result.
When the user clicks 'yes' to a 'weak crypto primitive' warning, and another such warning is pending next in line, we were failing an assertion when ssh2transport called register_dialog() for the second warning box, because the result callback in gtkdlg.c had not called unregister_dialog() for the previous one yet. Now that's done before rather than after delivering the result to the dialog's client.
This commit is contained in:
parent
637814544c
commit
2edae0d9d6
@ -3540,6 +3540,8 @@ static void simple_prompt_result_callback(void *vctx, int result)
|
|||||||
struct simple_prompt_result_ctx *ctx =
|
struct simple_prompt_result_ctx *ctx =
|
||||||
(struct simple_prompt_result_ctx *)vctx;
|
(struct simple_prompt_result_ctx *)vctx;
|
||||||
|
|
||||||
|
unregister_dialog(ctx->seat, ctx->dialog_slot);
|
||||||
|
|
||||||
if (result >= 0)
|
if (result >= 0)
|
||||||
ctx->callback(ctx->callback_ctx, result);
|
ctx->callback(ctx->callback_ctx, result);
|
||||||
|
|
||||||
@ -3547,7 +3549,6 @@ static void simple_prompt_result_callback(void *vctx, int result)
|
|||||||
* Clean up this context structure, whether or not a result was
|
* Clean up this context structure, whether or not a result was
|
||||||
* ever actually delivered from the dialog box.
|
* ever actually delivered from the dialog box.
|
||||||
*/
|
*/
|
||||||
unregister_dialog(ctx->seat, ctx->dialog_slot);
|
|
||||||
sfree(ctx);
|
sfree(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user