Bugfix with py operator api and modal operators. Modal operators would keep a referen...
authorMartin Poirier <theeth@yahoo.com>
Mon, 14 Sep 2009 16:00:42 +0000 (16:00 +0000)
committerMartin Poirier <theeth@yahoo.com>
Mon, 14 Sep 2009 16:00:42 +0000 (16:00 +0000)
commita3ce413f44ba13b5e95e53d3dc11a92a16ac1dd5
tree3c26fd7286fe7ceff7c0b72361a92a2d3f41020b
parent733b20f695ab43fb979963b82683aceedf25b8c8
Bugfix with py operator api and modal operators. Modal operators would keep a reference to Reports locally allocated in the api functions, which would crash and burn later when the operator would actually stop.

This commit introduces a flag at the Reports level that can be used to indicate that it needs to be freed (on top of the flag already existing in the operator, which I guess could be removed).

Reports for operators called through python are only persisted if they indicate that they are running modal.
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/python/intern/bpy_operator.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_event_system.c