git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@393 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-17 03:47:54 +00:00
parent ec86f5297e
commit 5862e59b63
5 changed files with 29 additions and 15 deletions

View File

@@ -16,7 +16,7 @@
* %param y Handler name
*/
#define MwDispatch(x, y) \
if(x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x)
if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x)
/*!
* %warning Used internally
@@ -26,7 +26,7 @@
* %return `0` for success, otherwise failed
*/
#define MwDispatch2(x, y) \
((x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0)
((!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0)
/*!
* %warning Used internally
@@ -36,7 +36,7 @@
* %param z Argument
*/
#define MwDispatch3(x, y, z) \
if(x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z)
if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z)
#define MwWaitMS 10

View File

@@ -106,6 +106,8 @@ struct _MwWidget {
MwWidget* destroy_queue;
MwWidget* tick_list;
int destroyed;
};
#endif