Merge commit 'origin/master (9395646c2c44cdf568ca950700d71fe966f2d80f)' into blender2.8
[blender.git] / source / blender / editors / interface / interface_handlers.c
index 59e0961f0db039c163942fe1b5a4ade8e6f2b050..ca0a5ffcbfcb06f36f83afdaf97f7c2449e953a8 100644 (file)
@@ -7007,7 +7007,8 @@ static bool ui_but_menu(bContext *C, uiBut *but)
                }
 
                /* Set the operator pointer for python access */
-               uiLayoutSetContextPointer(layout,"button_operator", but->opptr);
+               if (but->opptr)
+                       uiLayoutSetContextPointer(layout,"button_operator", but->opptr);
 
                uiItemS(layout);
        }