diff --git a/io_export_pc2.py b/io_export_pc2.py
index e00ee46b4586ef057a7e5062257381877ccdc435..fdc7232415f6f011ec9a9583afa1b51e13a0447f 100644
--- a/io_export_pc2.py
+++ b/io_export_pc2.py
@@ -153,7 +153,11 @@ class Export_pc2(bpy.types.Operator, ExportHelper):
 
     @classmethod
     def poll(cls, context):
-        return context.active_object.type in {'MESH', 'CURVE', 'SURFACE', 'FONT'}
+        obj = context.active_object
+        return (
+            obj is not None and
+            obj.type in {'MESH', 'CURVE', 'SURFACE', 'FONT'}
+        )
 
     def execute(self, context):
         start_time = time.time()