Avoid assert on startup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jun 2018 15:39:35 +0000 (17:39 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 18 Jun 2018 15:39:51 +0000 (17:39 +0200)
source/blender/editors/physics/particle_edit.c

index a4225e86a6e05328319c4d4bf33b68963ee5a633..66369d989bea10a0a4305502c9e2d810b93ffa60 100644 (file)
@@ -4669,9 +4669,14 @@ void PE_create_particle_edit(
                        psys = NULL;
                }
 
+               /* Causes assert on startup. */
+#if 0
                UI_GetThemeColor3ubv(TH_EDGE_SELECT, edit->sel_col);
                UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
-
+#else
+               memset(edit->sel_col,   0xff, sizeof(edit->sel_col));
+               memset(edit->nosel_col, 0x00, sizeof(edit->nosel_col));
+#endif
                recalc_lengths(edit);
                if (psys && !cache)
                        recalc_emitter_field(depsgraph, ob, psys);