Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-15 13:48:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-15 13:48:35 +0300
commit4be4c06671551da62edf197df6e7ad8c89dc2fe0 (patch)
tree17592201ff98be5c4d6fbd69b9f8c102a168365e /source/blender/windowmanager
parent80edc0e972a2dde85509968832ce21f46d86ce58 (diff)
Cleanup: redundant checks
In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1bd98cdc996..d649b21569e 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3516,7 +3516,7 @@ static int previews_clear_exec(bContext *C, wmOperator *op)
BKE_idcode_to_idfilter(GS(id->name)) & id_filters);
#endif
- if (!id || !(BKE_idcode_to_idfilter(GS(id->name)) & id_filters)) {
+ if (!(BKE_idcode_to_idfilter(GS(id->name)) & id_filters)) {
continue;
}
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 51dccf5bb8b..ac5fd522664 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -525,9 +525,7 @@ static void build_pict_list_ex(
BLI_stringenc(filepath, fp_decoded.head, fp_decoded.tail, fp_decoded.digits, fp_framenr);
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0))) {
- if (hasevent) {
- GHOST_DispatchEvents(g_WS.ghost_system);
- }
+ GHOST_DispatchEvents(g_WS.ghost_system);
if (ps->loading == false) {
return;
}