Hard to tell, unless you post the full code around that. That statement works in the example in the simulator and, obviously, in my implementation, so you’d need to post the code around this or ensure you have fully instantiated and prepared everything, much like this in the example:
/*Initialize the new theme from the current theme*/
lv_theme_t * th_act = lv_display_get_theme(NULL);
static lv_theme_t th_new;
th_new = *th_act;
/*Set the parent theme and the style apply callback for the new theme*/
lv_theme_set_parent(&th_new, th_act);
lv_theme_set_apply_cb(&th_new, new_theme_apply_cb);
/*Assign the new theme to the current display*/
lv_display_set_theme(NULL, &th_new);
Beyond that, I’ve only implemented this once, so not much experience of common issues around this 
Another alternative, and one design pattern I use a lot with LVGL for several reasons, is to define your own function to create a button, call that everywhere you need, and apply the style in that function.
I do this a lot with LVGL because with all the configuration options possible, there is a lot of boilerplate code, that is often repeated, so it reduces the amount of code, simplifies maintenance and, when LVGL major version changes, reduces the effort to migrate all the changed interfaces.
For instance, you could create your standard button with a standard style, a centered label and a callback with one line:
lv_obj_t * myButton = createButton(screen, "Cancel", my_callback);
and implemented as such:
lv_obj_t * createButton(lv_obj_t * parent, const char * labelText, lv_event_cb_t cb)
{
lv_obj_t * button = lv_button_create(parent);
lv_obj_add_style(button, &style_button, LV_PART_MAIN);
lv_obj_add_event_cb(button, cb, LV_EVENT_CLICKED, NULL);
lv_obj_t * label = lv_label_create(button);
lv_label_set_text(label, labelText);
lv_obj_center(label);
return button;
}
I do this for pretty much every object type in LVGL, as I pretty much apply standard things to them all (like screen loaded/unloaded callbacks to each screen, etc)