Fix #36892: crash running "Sample Color" operator from 3D viewport when the
[blender.git] / source / blender / editors / space_sequencer / sequencer_view.c
index 18733d4e4094fe0142b804fd9c97773268f65517..deb37f8d943453845787bfcc32b2a8b727064472 100644 (file)
@@ -220,7 +220,8 @@ static int sample_cancel(bContext *C, wmOperator *op)
 
 static int sample_poll(bContext *C)
 {
-       return BKE_sequencer_editing_get(CTX_data_scene(C), FALSE) != NULL;
+       SpaceSeq *sseq = CTX_wm_space_seq(C);
+       return sseq && BKE_sequencer_editing_get(CTX_data_scene(C), FALSE) != NULL;
 }
 
 void SEQUENCER_OT_sample(wmOperatorType *ot)