OK, I didn't have the code which causes it quite right:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayerCount()

Outputs 1

However:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayers()

and:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayer(0)

both cause the RTTI error and QGIS to hang.




-----
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290834.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to